Skip to content

NRG (2.11): Ignore AEs from older terms#5661

Merged
derekcollison merged 1 commit intomainfrom
neil/nrgoldae
Jul 22, 2024
Merged

NRG (2.11): Ignore AEs from older terms#5661
derekcollison merged 1 commit intomainfrom
neil/nrgoldae

Conversation

@neilalexander
Copy link
Copy Markdown
Member

@neilalexander neilalexander commented Jul 16, 2024

Many of the follower resets that we see happen because append entries from previous terms can be in-flight during leadership transfers. This problem is worsened when high or variable latency is involved.

When a follower receives an AE from an old term today, they will reset and nuke their WAL and then run a catch-up regardless of the integrity of the log. However this situation ignores the fact that the node might have been otherwise functioning normally and network latency may be worse on some links than others. Silently dropping the AEs from previous terms and restricting the reset behaviour to the last log term and last log index reduces the number of resets considerably whilst maintaining log consistency.

Co-authored-by: Reuben Ninan reuben@nats.io
Signed-off-by: Neil Twigg neil@nats.io

@neilalexander neilalexander changed the title NRG: Ignore AEs from older terms NRG (2.11): Ignore AEs from older terms Jul 16, 2024
@neilalexander neilalexander force-pushed the neil/nrgoldae branch 2 times, most recently from cccb2e6 to dff0a38 Compare July 18, 2024 16:11
Co-authored-by: Reuben Ninan <reuben@nats.io>
Signed-off-by: Neil Twigg <neil@nats.io>
@neilalexander neilalexander marked this pull request as ready for review July 19, 2024 12:56
@neilalexander neilalexander requested a review from a team as a code owner July 19, 2024 12:56
Copy link
Copy Markdown
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@derekcollison derekcollison merged commit fee0522 into main Jul 22, 2024
@derekcollison derekcollison deleted the neil/nrgoldae branch July 22, 2024 15:41
neilalexander added a commit that referenced this pull request Nov 25, 2024
Includes the following:

- #5661
- #5666
- #5671
- #5344
- #5684
- #5689
- #5691
- #5714
- #5717
- #5707
- #5792
- #5912
- #5957
- #5700
- #5975
- #5991
- #5987
- #6027
- #6038
- #6053
- #5848
- #6055
- #6056
- #6060
- #6061
- #6072
- #5832
- #6073
- #6107

Signed-off-by: Neil Twigg <neil@nats.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants