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:
parent
f1abf6beb3
commit
be2800a8e4
@ -54,6 +54,9 @@ func (b *Batch) Delete(key []byte) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (b *Batch) Merge(key, val []byte) {
|
func (b *Batch) Merge(key, val []byte) {
|
||||||
|
if b.buf != nil {
|
||||||
|
b.bufUsed += len(key) + len(val)
|
||||||
|
}
|
||||||
b.merge.Merge(key, val)
|
b.merge.Merge(key, val)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -219,7 +219,7 @@ func (udc *UpsideDownCouch) batchRows(writer store.KVWriter, addRowsAll [][]Upsi
|
|||||||
totBytes := addKeyBytes + addValBytes +
|
totBytes := addKeyBytes + addValBytes +
|
||||||
updateKeyBytes + updateValBytes +
|
updateKeyBytes + updateValBytes +
|
||||||
deleteKeyBytes +
|
deleteKeyBytes +
|
||||||
mergeKeyBytes + mergeValBytes
|
2*(mergeKeyBytes+mergeValBytes)
|
||||||
|
|
||||||
buf, wb, err := writer.NewBatchEx(store.KVBatchOptions{
|
buf, wb, err := writer.NewBatchEx(store.KVBatchOptions{
|
||||||
TotalBytes: totBytes,
|
TotalBytes: totBytes,
|
||||||
|
Loading…
Reference in New Issue
Block a user