Skip to content
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

Fix testReplicaIgnoresOlderRetentionLeasesVersion #38246

Merged
merged 1 commit into from
Feb 2, 2019

Conversation

dnhatn
Copy link
Member

@dnhatn dnhatn commented Feb 2, 2019

If the innerLength is 0, the version won't be increased; then there will
be two RetentionLeases with the same term and version, but their leases
are different.

Relates #37951
Closes #38245

@dnhatn dnhatn added >test Issues or PRs that are addressing/adding tests v7.0.0 :Distributed Indexing/Distributed A catch all label for anything in the Distributed Area. Please avoid if you can. v6.7.0 labels Feb 2, 2019
@dnhatn dnhatn requested a review from jasontedor February 2, 2019 03:10
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

@dnhatn
Copy link
Member Author

dnhatn commented Feb 2, 2019

@jasontedor I am wondering if we should add a new assertion to ensure that if the term and version are the same, then the leases must also be the same (like the existing assertion that we have in Translog https://github.com/elastic/elasticsearch/blob/master/server/src/main/java/org/elasticsearch/index/translog/TranslogWriter.java#L215)?

@dnhatn dnhatn changed the title FIx testReplicaIgnoresOlderRetentionLeasesVersion Fix testReplicaIgnoresOlderRetentionLeasesVersion Feb 2, 2019
Copy link
Member

@jasontedor jasontedor 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 2, 2019

Thanks @jasontedor.

@dnhatn dnhatn merged commit 1ec04df into elastic:master Feb 2, 2019
@dnhatn dnhatn deleted the fix-leases-version branch February 2, 2019 07:37
@dnhatn dnhatn added backport and removed backport labels Feb 2, 2019
dnhatn added a commit to dnhatn/elasticsearch that referenced this pull request Feb 2, 2019
If the innerLength is 0, the version won't be increased; then there will
be two RetentionLeases with the same term and version, but their leases
are different.

Relates elastic#37951
Closes elastic#38245
dnhatn added a commit that referenced this pull request Feb 2, 2019
If the innerLength is 0, the version won't be increased; then there will
be two RetentionLeases with the same term and version, but their leases
are different.

Relates #37951
Closes #38245
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Indexing/Distributed A catch all label for anything in the Distributed Area. Please avoid if you can. >test Issues or PRs that are addressing/adding tests v6.7.0 v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants