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 <yihao.dai@zilliz.com>
This commit is contained in:
yihao.dai 2024-03-28 10:23:11 +08:00 committed by GitHub
parent 8f3e0b6b41
commit 78fbb87b3a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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
}