fix: Fix incorrect segment num rows (#34441)

Repeated calls to UpdateStatistics, this PR correct it.

issue: https://github.com/milvus-io/milvus/issues/34440

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
pull/34496/head
yihao.dai 2024-07-08 20:00:14 +08:00 committed by GitHub
parent 8af187f673
commit e15ac2b472
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 2 deletions

View File

@ -107,7 +107,6 @@ func (ib *InsertBuffer) buffer(inData *storage.InsertData, tr TimeRange, startPo
// buffer := ib.currentBuffer()
// storage.MergeInsertData(buffer.buffer, inData)
ib.buffers = append(ib.buffers, inData)
ib.UpdateStatistics(int64(inData.GetRowNum()), int64(inData.GetMemorySize()), tr, startPos, endPos)
}
func (ib *InsertBuffer) Yield() []*storage.InsertData {

View File

@ -597,7 +597,7 @@ func (wb *writeBufferBase) getSyncTask(ctx context.Context, segmentID int64) (sy
actions := []metacache.SegmentAction{}
for _, chunk := range insert {
batchSize = int64(chunk.GetRowNum())
batchSize += int64(chunk.GetRowNum())
totalMemSize += float64(chunk.GetMemorySize())
}