0
0

MB-18715 - moss Merge() didn't bump bufUsed correctly

And, also allocate more memory for both the partial and full merges.
This commit is contained in:
Steve Yen 2016-03-15 17:09:36 -07:00
parent f1abf6beb3
commit be2800a8e4
2 changed files with 4 additions and 1 deletions

View File

@ -54,6 +54,9 @@ func (b *Batch) Delete(key []byte) {
}
func (b *Batch) Merge(key, val []byte) {
if b.buf != nil {
b.bufUsed += len(key) + len(val)
}
b.merge.Merge(key, val)
}

View File

@ -219,7 +219,7 @@ func (udc *UpsideDownCouch) batchRows(writer store.KVWriter, addRowsAll [][]Upsi
totBytes := addKeyBytes + addValBytes +
updateKeyBytes + updateValBytes +
deleteKeyBytes +
mergeKeyBytes + mergeValBytes
2*(mergeKeyBytes+mergeValBytes)
buf, wb, err := writer.NewBatchEx(store.KVBatchOptions{
TotalBytes: totBytes,