lib/storage: allow filling all the rows up to their capacity in rawRowsShard.addRows

This should reduce memory usage a bit on data ingestion path
This commit is contained in:
Aliaksandr Valialkin 2021-05-24 15:22:57 +03:00
parent 0f84503880
commit 95b735a883

View file

@ -484,7 +484,7 @@ func (rrs *rawRowsShard) addRows(pt *partition, rows []rawRow) {
if cap(rrs.rows) == 0 {
rrs.rows = getRawRowsMaxSize().rows
}
maxRowsCount := getMaxRawRowsPerPartition()
maxRowsCount := cap(rrs.rows)
for {
capacity := maxRowsCount - len(rrs.rows)
if capacity >= len(rows) {