Skip to content

Fix IndexShardIT#testMaybeFlush #52247

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

Merged
merged 2 commits into from
Feb 12, 2020
Merged

Fix IndexShardIT#testMaybeFlush #52247

merged 2 commits into from
Feb 12, 2020

Conversation

dnhatn
Copy link
Member

@dnhatn dnhatn commented Feb 12, 2020

Since #51905, we use the local checkpoint of the safe commit to calculate the number of uncommitted operations of a translog stats. If a periodic flush triggered by afterWriteOperation completes before we sync translog, then the last commit is not safe. We also need to sync translog from Engine instead of the translog so that we can advance the safe commit.

Relates #51905
Closes #52223

@dnhatn dnhatn added >test Issues or PRs that are addressing/adding tests :Distributed Indexing/Engine Anything around managing Lucene and the Translog in an open shard. v8.0.0 v7.7.0 labels Feb 12, 2020
@dnhatn dnhatn requested a review from ywelsch February 12, 2020 02:29
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (:Distributed/Engine)

Copy link
Contributor

@ywelsch ywelsch left a comment

Choose a reason for hiding this comment

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

LGTM

@dnhatn
Copy link
Member Author

dnhatn commented Feb 12, 2020

Thanks Yannick.

@dnhatn dnhatn merged commit 6c9bdb8 into elastic:master Feb 12, 2020
@dnhatn dnhatn deleted the fix-maybe-flush branch February 12, 2020 16:06
dnhatn added a commit to dnhatn/elasticsearch that referenced this pull request Feb 26, 2020
Since elastic#51905, we use the local checkpoint of the safe commit to
calculate the number of uncommitted operations of a translog stats. If a
periodic flush triggered by afterWriteOperation completes before we sync
translog, then the last commit is not safe. We also need to sync
translog from Engine instead of the translog so that we can advance the
safe commit.

Relates elastic#51905
Closes elastic#52223
dnhatn added a commit that referenced this pull request Feb 26, 2020
Since #51905, we use the local checkpoint of the safe commit to
calculate the number of uncommitted operations of a translog stats. If a
periodic flush triggered by afterWriteOperation completes before we sync
translog, then the last commit is not safe. We also need to sync
translog from Engine instead of the translog so that we can advance the
safe commit.

Relates #51905
Closes #52223
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. >test Issues or PRs that are addressing/adding tests v7.7.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CI] IndexShardIT » testMaybeFlush
4 participants