Skip to content

Conversation

@jasontedor
Copy link
Member

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).

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).
Copy link
Contributor

@bleskes bleskes left a 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
Copy link
Contributor

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)"

@bleskes
Copy link
Contributor

bleskes commented Nov 8, 2017

retest this please

@jasontedor jasontedor merged commit 927d7f6 into elastic:master Nov 8, 2017
jasontedor added a commit that referenced this pull request Nov 8, 2017
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
jasontedor added a commit that referenced this pull request Nov 8, 2017
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
@jasontedor jasontedor deleted the roll-translog-generation-on-promotion branch November 8, 2017 14:31
@lcawl lcawl removed the v6.1.0 label Dec 12, 2017
@clintongormley clintongormley added :Distributed Indexing/Engine Anything around managing Lucene and the Translog in an open shard. and removed :Sequence IDs labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed Indexing/Engine Anything around managing Lucene and the Translog in an open shard. >enhancement v6.0.0 v7.0.0-beta1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants