When moving streams, we could check too soon and be in a gap where the replica peer has not registered a catchup request.

This would cause us to think the replica was caughtup incorrectly and drop our leadership, which would cancel any cacthup requests.

Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
Derek Collison
2023-08-21 20:07:48 -07:00
parent 2fc3f45ea1
commit e5d208bf33
3 changed files with 65 additions and 15 deletions

View File

@@ -3288,7 +3288,7 @@ func (o *consumer) checkAckFloor() {
}
}
} else if numPending > 0 {
// here it shorter to walk pending.
// here it is shorter to walk pending.
// toTerm is seq, dseq, rcd for each entry.
toTerm := make([]uint64, 0, numPending*3)
o.mu.RLock()