Fix waitNewTSafe not waiting (#10724)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/10746/head
congqixia 2021-10-27 14:22:22 +08:00 committed by GitHub
parent c51155a542
commit 5317c8abab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -221,6 +221,8 @@ func (q *queryCollection) waitNewTSafe() (Timestamp, error) {
for !q.tSafeUpdate {
q.watcherCond.Wait()
}
q.tSafeUpdate = false
q.watcherCond.Broadcast()
q.watcherCond.L.Unlock()
q.tSafeWatchersMu.RLock()
defer q.tSafeWatchersMu.RUnlock()