fix: [2.5] Fix task delta cache data race (#40262)

issue: https://github.com/milvus-io/milvus/issues/40258

pr: https://github.com/milvus-io/milvus/pull/40259

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
This commit is contained in:
yihao.dai 2025-03-02 16:52:10 +08:00 committed by GitHub
parent 3f76e1c6d1
commit 893caee467
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -248,8 +248,8 @@ func (etd *ExecutingTaskDelta) printDetailInfos() {
}
func (etd *ExecutingTaskDelta) Clear() {
etd.mu.RLock()
defer etd.mu.RUnlock()
etd.mu.Lock()
defer etd.mu.Unlock()
etd.data = make(map[int64]map[int64]int)
etd.taskIDRecords.Clear()
}