-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Roll translog generation on primary promotion #27313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Roll translog generation on primary promotion #27313
Conversation
When a primary is promoted, rolling the translog generation here makes simpler reasoning about the relationship between primary terms and translog generation. Note that this is not strictly necessary for correctness (e.g., to avoid duplicate operations with the same sequence number within a single generation).
bleskes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. thx
| * numbers. To ensure that this is not the case, we restore the state of the local checkpoint tracker by | ||
| * replaying the translog and marking any operations there are completed. | ||
| * replaying the translog and marking any operations there are completed. Rolling the translog generation is | ||
| * not strictly needed here, but it simplifies reasoning about the relationship between primary terms and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add to "not strictly needed here" , "not strictly needed here (we will never have collisions between sequences numbers in the translog files in a new primary as it takes the last know seq# as a starting point)"
|
retest this please |
When a primary is promoted, rolling the translog generation here makes simpler reasoning about the relationship between primary terms and translog generation. Note that this is not strictly necessary for correctness (e.g., to avoid duplicate operations with the same sequence number within a single generation). Relates #27313
When a primary is promoted, rolling the translog generation here makes simpler reasoning about the relationship between primary terms and translog generation. Note that this is not strictly necessary for correctness (e.g., to avoid duplicate operations with the same sequence number within a single generation). Relates #27313
When a primary is promoted, rolling the translog generation here makes simpler reasoning about the relationship between primary terms and translog generation. Note that this is not strictly necessary for correctness (e.g., to avoid duplicate operations with the same sequence number within a single generation).