Advance max_seq_no before add operation to Lucene#9346
Merged
mergify[bot] merged 1 commit intomasterfrom Nov 18, 2019
Merged
Conversation
Member
mfussenegger
left a comment
There was a problem hiding this comment.
please refer to the upstream change in the commit msg
This commit fixes the issue of potential mismatches between the max_seq_no in the commit's user_data and the seq_no of some documents in the Lucene commit. The mismatch could arise when processing an operation on a replica engine, as we first added it to Lucene, then to the translog, to finally mark seq_no as completed. If a flush occurred after step1, but before the marking, then the max_seq_no in the commit's user_data would be smaller than the seq_no of some documents in the Lucene commit. Port of elastic/elasticsearch#38879
598ccd3 to
8e6ae79
Compare
mfussenegger
approved these changes
Nov 18, 2019
marregui
added a commit
that referenced
this pull request
Nov 18, 2019
Advance max_seq_no before add operation to Lucene. This commit fixes the issue of potential mismatches between the max_seq_no in the commit's user_data and the seq_no of some documents in the Lucene commit. The mismatch could arise when processing an operation on a replica engine, as we first added it to Lucene, then to the translog, to finally mark seq_no as completed. If a flush occurred after step1, but before the marking, then the max_seq_no in the commit's user_data would be smaller than the seq_no of some documents in the Lucene commit. Port of elastic/elasticsearch#38879
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit fixes the issue of potential mismatches between the max_seq_no in
the commit's user_data and the seq_no of some documents in the Lucene commit.
The mismatch could arise when processing an operation on a replica engine, as
we first added it to Lucene, then to the translog, to finally mark seq_no as
completed. If a flush occurred after step1, but before the marking, then the
max_seq_no in the commit's user_data would be smaller than the seq_no of some
documents in the Lucene commit.
Checklist
CHANGES.txtCHANGES.txt(E.g. AdminUI)