fix memory leak by closing batches in batchRows()
This commit is contained in:
parent
70105477cf
commit
860de28a28
@ -194,6 +194,9 @@ func (f *Firestorm) batchRows(writer store.KVWriter, rowsOfRows [][]index.IndexR
|
|||||||
|
|
||||||
// prepare batch
|
// prepare batch
|
||||||
wb := writer.NewBatch()
|
wb := writer.NewBatch()
|
||||||
|
defer func() {
|
||||||
|
_ = wb.Close()
|
||||||
|
}()
|
||||||
|
|
||||||
var kbuf []byte
|
var kbuf []byte
|
||||||
var vbuf []byte
|
var vbuf []byte
|
||||||
|
@ -139,6 +139,9 @@ func (udc *UpsideDownCouch) batchRows(writer store.KVWriter, addRows []UpsideDow
|
|||||||
|
|
||||||
// prepare batch
|
// prepare batch
|
||||||
wb := writer.NewBatch()
|
wb := writer.NewBatch()
|
||||||
|
defer func() {
|
||||||
|
_ = wb.Close()
|
||||||
|
}()
|
||||||
|
|
||||||
// buffer to work with
|
// buffer to work with
|
||||||
rowBuf := GetRowBuffer()
|
rowBuf := GetRowBuffer()
|
||||||
|
Loading…
Reference in New Issue
Block a user