From 0c5aafd2d16e3857d65ea57723ad091ad30e327c Mon Sep 17 00:00:00 2001 From: "cai.zhang" Date: Tue, 16 Jul 2024 15:57:43 +0800 Subject: [PATCH] fix:[cherry-pick] Reset flushed row num after pack segment for clustering compaction (#34704) issue: #34703 master pr: #34702 Signed-off-by: Cai Zhang --- internal/datanode/compaction/clustering_compactor.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/datanode/compaction/clustering_compactor.go b/internal/datanode/compaction/clustering_compactor.go index 2a1d7ae7fa..0c5d43f152 100644 --- a/internal/datanode/compaction/clustering_compactor.go +++ b/internal/datanode/compaction/clustering_compactor.go @@ -831,6 +831,8 @@ func (t *clusteringCompactionTask) packBufferToSegment(ctx context.Context, buff zap.Int64("segID", seg.GetSegmentID()), zap.Int64("row num", seg.GetNumOfRows())) + // reset + buffer.flushedRowNum.Store(0) // set old writer nil writer = nil return nil