Skip to content

Advance max_seq_no before add operation to Lucene#9346

Merged
mergify[bot] merged 1 commit intomasterfrom
ma/port_PR38879
Nov 18, 2019
Merged

Advance max_seq_no before add operation to Lucene#9346
mergify[bot] merged 1 commit intomasterfrom
ma/port_PR38879

Conversation

@marregui
Copy link
Copy Markdown
Contributor

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

  • User relevant changes are recorded in CHANGES.txt
  • Touched code is covered by tests
  • Documentation has been updated if necessary
  • CLA is signed
  • This does not contain breaking changes, or if it does:
    • It is released within a major release
    • It is recorded in CHANGES.txt
    • It was marked as deprecated in an earlier release if possible
    • You've thought about the consequences and other components are adapted
      (E.g. AdminUI)

Copy link
Copy Markdown
Member

@mfussenegger mfussenegger left a comment

Choose a reason for hiding this comment

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

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
@marregui marregui added the ready-to-merge Let Mergify merge the PR once approved and checks pass label Nov 18, 2019
@mergify mergify bot merged commit b126ec5 into master Nov 18, 2019
@mergify mergify bot deleted the ma/port_PR38879 branch November 18, 2019 12:13
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
@marregui marregui added the v/4.0 label Dec 4, 2019
@marregui marregui self-assigned this Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Let Mergify merge the PR once approved and checks pass v/4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants