0
0

Merge pull request #348 from steveyen/moss-MaxPreMergerBatches-renamed

moss option MaxPreMergerBatches renamed
This commit is contained in:
Marty Schoch 2016-03-03 15:03:49 -05:00
commit 9d2f424a88

View File

@ -61,16 +61,16 @@ func NewEx(mo store.MergeOperator, config map[string]interface{},
} }
} }
maxStackDirtyTopHeight := moss.DefaultCollectionOptions.MaxStackDirtyTopHeight maxPreMergerBatches := moss.DefaultCollectionOptions.MaxPreMergerBatches
v, ok = config["mossMaxStackDirtyTopHeight"] v, ok = config["mossMaxPreMergerBatches"]
if ok { if ok {
maxStackDirtyTopHeightF, ok := v.(float64) maxPreMergerBatchesF, ok := v.(float64)
if !ok { if !ok {
return nil, fmt.Errorf("moss store,"+ return nil, fmt.Errorf("moss store,"+
" could not parse config[mossMaxStackDirtyTopHeight]: %v", v) " could not parse config[mossMaxPreMergerBatches]: %v", v)
} }
maxStackDirtyTopHeight = int(maxStackDirtyTopHeightF) maxPreMergerBatches = int(maxPreMergerBatchesF)
} }
mossLowerLevelStoreName := "" mossLowerLevelStoreName := ""
@ -105,8 +105,8 @@ func NewEx(mo store.MergeOperator, config map[string]interface{},
options.MinMergePercentage = minMergePercentage options.MinMergePercentage = minMergePercentage
} }
if options.MaxStackDirtyTopHeight <= 0 { if options.MaxPreMergerBatches <= 0 {
options.MaxStackDirtyTopHeight = maxStackDirtyTopHeight options.MaxPreMergerBatches = maxPreMergerBatches
} }
if options.Debug <= 0 { if options.Debug <= 0 {