mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
Fix tsafe close deadlock (#8567)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
parent
0483ae810f
commit
de3fd15aee
@ -164,12 +164,13 @@ func (ts *tSafe) set(id UniqueID, t Timestamp) {
|
||||
}
|
||||
|
||||
func (ts *tSafe) close() {
|
||||
ts.tSafeMu.Lock()
|
||||
defer ts.tSafeMu.Unlock()
|
||||
|
||||
ts.cancel()
|
||||
// wait for all job done
|
||||
ts.closeWg.Wait()
|
||||
|
||||
ts.tSafeMu.Lock()
|
||||
defer ts.tSafeMu.Unlock()
|
||||
|
||||
for _, watcher := range ts.watcherList {
|
||||
close(watcher.notifyChan)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user