mirror of https://github.com/milvus-io/milvus.git
fix: Fix data race for clustering compaction writer (#35957)
issue: #35950 Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>pull/35961/head
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