Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIXED] Catchup must not extend past requested sequence range (#6038)
When we're being asked to provide data within a range during catchup, we should not extend that range and provide more data. Especially since that range was defined by a snapshot, which also specifies which RAFT entries should be sent after processing that snapshot. This would just result in duplicated work and possible desync for the follower, so these lines can safely be removed. **Timeline of these lines:** Previously when receiving a catchup request the `FirstSeq` could be moved up to match what the state says: [[IMPROVED] Catchup improvements #3348](https://github.com/nats-io/nats-server/pull/3348/files#diff-5cb252c37caef12e7027803018861c82724b120ddb62cfedc2f36addf57f6970R7132-R7138) (August, 2022) Afterward this was removed in favor of only extending the `LastSeq`: [[FIXED] KeyValue not found after server restarts #5054](https://github.com/nats-io/nats-server/pull/5054/files#diff-5cb252c37caef12e7027803018861c82724b120ddb62cfedc2f36addf57f6970R8579-R8588) (February, 2024) This was done to solve for KeyValue not found issues. However this change would have also fixed that case: [[FIXED] Do not bump clfs on seq mismatch when before stream LastSeq #5821](https://github.com/nats-io/nats-server/pull/5821/files#diff-2f4991438bb868a8587303cde9107f83127e88ad70bd19d5c6a31c238a20c299R4694-R4699) (August, 2024) Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
- Loading branch information