Do actual batch sizing for badger
This commit is contained in:
parent
291b0ca96c
commit
a1afa6fbd6
|
@ -281,11 +281,13 @@ func (c *AppendConverter) ConvertToBadger(s *specializedstore.BadgerStore, batch
|
|||
l = nrecords
|
||||
}
|
||||
|
||||
records := make([]panako.StoreRecord, 0, int64(c.resourceIndex[i].length)*splitSize)
|
||||
|
||||
for _, control := range c.resourceIndex[i:l] {
|
||||
records := c.ReadRecords(control.resourceId, control.recordsStartIndex, int64(control.length))
|
||||
s.StorePanakoPrints(records)
|
||||
records = append(records, c.ReadRecords(control.resourceId, control.recordsStartIndex, int64(control.length))...)
|
||||
atomic.AddInt64(&ts.processed, int64(len(records))+c.controlSize)
|
||||
}
|
||||
s.StorePanakoPrints(records)
|
||||
}
|
||||
}()
|
||||
|
||||
|
|
Loading…
Reference in a new issue