Skip to content

NRG: Do not set pterm/pindex if no snapshots and/or log entries#6060

Merged
derekcollison merged 1 commit intomainfrom
neil/nrgreplay
Oct 31, 2024
Merged

NRG: Do not set pterm/pindex if no snapshots and/or log entries#6060
derekcollison merged 1 commit intomainfrom
neil/nrgreplay

Conversation

@neilalexander
Copy link
Copy Markdown
Member

If we haven't recovered the pterm/pindex from a snapshot, and the WAL is empty, then we shouldn't tell other nodes that we have a log that we don't have (i.e. by vote request). Instead leave both pterm and pindex as zero to correctly signal that we don't know anything about the state of the log.

Signed-off-by: Neil Twigg neil@nats.io

If we haven't recovered the `pterm`/`pindex` from a snapshot, and the
WAL is empty, then we shouldn't tell other nodes that we have a log that
we don't have (i.e. by vote request). Instead leave both `pterm` and
`pindex` as zero to correctly signal that we don't know anything about
the state of the log.

Signed-off-by: Neil Twigg <neil@nats.io>
@neilalexander neilalexander requested a review from a team as a code owner October 31, 2024 10:31
Copy link
Copy Markdown
Member

@MauriceVanVeen MauriceVanVeen left a comment

Choose a reason for hiding this comment

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

LGTM

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 b291db9 into main Oct 31, 2024
@derekcollison derekcollison deleted the neil/nrgreplay branch October 31, 2024 15:40
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.

3 participants