0
0
Fork 0

scorch added kvconfig unsafe_batch option

Added an option to the kvconfig JSON, called "unsafe_batch" (bool).
Default is false, so Batch() calls are synchronously persisted by
default.  Advanced users may want to unsafe, asynchronous persistence
to tradeoff performance (mutations are queryable sooner) over safety.

    {
      "index_type": "scorch",
      "kvconfig": { "unsafe_batch": true }
    }

This change replaces the previous kvstore=="moss" workaround.
This commit is contained in:
Steve Yen 2017-12-20 10:06:50 -08:00
parent 1abbfadf0d
commit df6c8f4074
1 changed files with 3 additions and 3 deletions

View File

@ -81,9 +81,9 @@ func NewScorch(storeName string, config map[string]interface{}, analysisQueue *i
if ok {
rv.readOnly = ro
}
// hack for now to disable safe batches in FTS
if storeName == "moss" {
rv.unsafeBatch = true
ub, ok := config["unsafe_batch"].(bool)
if ok {
rv.unsafeBatch = ub
}
return rv, nil
}