mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-30 02:48:45 +08:00
fix: Fix data race for clustering compaction writer (#35957)
issue: #35950 Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
This commit is contained in:
parent
6eb8b3f745
commit
90bdb171ab
@ -458,7 +458,9 @@ func (t *clusteringCompactionTask) mapping(ctx context.Context,
|
||||
func (t *clusteringCompactionTask) getBufferTotalUsedMemorySize() int64 {
|
||||
var totalBufferSize int64 = 0
|
||||
for _, buffer := range t.clusterBuffers {
|
||||
t.clusterBufferLocks.Lock(buffer.id)
|
||||
totalBufferSize = totalBufferSize + int64(buffer.writer.WrittenMemorySize()) + buffer.bufferMemorySize.Load()
|
||||
t.clusterBufferLocks.Unlock(buffer.id)
|
||||
}
|
||||
return totalBufferSize
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user