0
0

moss option MaxPreMergerBatches renamed

This commit is contained in:
Steve Yen 2016-03-03 11:18:30 -08:00
parent f1a3a7a221
commit f6d1bd2c87

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 {