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
|
||||
wb := writer.NewBatch()
|
||||
defer func() {
|
||||
_ = wb.Close()
|
||||
}()
|
||||
|
||||
var kbuf []byte
|
||||
var vbuf []byte
|
||||
|
@ -139,6 +139,9 @@ func (udc *UpsideDownCouch) batchRows(writer store.KVWriter, addRows []UpsideDow
|
||||
|
||||
// prepare batch
|
||||
wb := writer.NewBatch()
|
||||
defer func() {
|
||||
_ = wb.Close()
|
||||
}()
|
||||
|
||||
// buffer to work with
|
||||
rowBuf := GetRowBuffer()
|
||||
|
Loading…
Reference in New Issue
Block a user