From 78fbb87b3ad48c39943b6edab3d10579f26ff948 Mon Sep 17 00:00:00 2001 From: "yihao.dai" Date: Thu, 28 Mar 2024 10:23:11 +0800 Subject: [PATCH] enhance: Release blobs in sync task once sync is completed (#31661) Once the synchronization of the sync task is completed, it's necessary to release the blob within the sync task, as the caller may continue to reference it. issue: https://github.com/milvus-io/milvus/issues/31545 Signed-off-by: bigsheeper --- internal/datanode/syncmgr/task.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/datanode/syncmgr/task.go b/internal/datanode/syncmgr/task.go index fbc782f8b6..d11e613381 100644 --- a/internal/datanode/syncmgr/task.go +++ b/internal/datanode/syncmgr/task.go @@ -216,6 +216,13 @@ func (t *SyncTask) Run() (err error) { metrics.DataNodeAutoFlushBufferCount.WithLabelValues(fmt.Sprint(paramtable.GetNodeID()), metrics.SuccessLabel, t.level.String()).Inc() } metrics.DataNodeFlushBufferCount.WithLabelValues(fmt.Sprint(paramtable.GetNodeID()), metrics.SuccessLabel, t.level.String()).Inc() + + // free blobs and data + t.binlogBlobs = nil + t.deltaBlob = nil + t.mergedStatsBlob = nil + t.batchStatsBlob = nil + t.segmentData = nil return nil }