mirror of
https://github.com/dolthub/dolt.git
synced 2026-03-09 11:19:01 -05:00
go: sqle: cluster: Only close successChs when we are actually caught up.
This commit is contained in:
@@ -157,13 +157,13 @@ func (h *commithook) replicate(ctx context.Context) {
|
||||
if h.waitNotify != nil {
|
||||
h.waitNotify()
|
||||
}
|
||||
if len(h.successChs) != 0 {
|
||||
if len(h.successChs) != 0 && h.isCaughtUp() {
|
||||
for _, ch := range h.successChs {
|
||||
close(ch)
|
||||
}
|
||||
h.successChs = nil
|
||||
h.circuitBreakerOpen = false
|
||||
}
|
||||
h.circuitBreakerOpen = false
|
||||
h.cond.Wait()
|
||||
lgr.Tracef("cluster/commithook: background thread: woken up.")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user