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

Relax assertion in testRetentionLeasesSyncOnExpiration #38070

Closed
wants to merge 1 commit into from

Conversation

dnhatn
Copy link
Member

@dnhatn dnhatn commented Jan 31, 2019

The returned retention leases are collected from a HashMap which the
insert-order is not reserved; thus we should relax the order of leases.

Closes #37963

The returned retention leases are collected from a HashMap which the
insert-order is not reserved. We should relax the order of leases.

Closes elastic#37963
@dnhatn dnhatn added >test Issues or PRs that are addressing/adding tests v7.0.0 :Distributed/Distributed A catch all label for anything in the Distributed Area. If you aren't sure, use this one. v6.7.0 labels Jan 31, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

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.

I am confused by this change. Starting with line 146, we assert that on the primary, the leases are either empty, or contain a single non-expired retention lease. For the assertion being changed here to be failing, that means that currentRetentionLeases is not empty. By the assertion on line 146, that means that currentRetentionLeases contains a single retention lease, the one non-expired retention lease. Therefore I do not see how changing from contains to containsInAnyOrder helps with that problem. Rather, I think that something else is going on although it is still not clear to me what. Note how the assert busy shows there was another retention lease on the replica, and then eventually none.

@jasontedor
Copy link
Member

@dnhatn I think that I have a better version of this test in a PR that I am working on.

@dnhatn
Copy link
Member Author

dnhatn commented Feb 4, 2019

@jasontedor yeah, can I close this one?

@jasontedor
Copy link
Member

@dnhatn I opened #38380.

@dnhatn
Copy link
Member Author

dnhatn commented Feb 5, 2019

Closes in favor of #38380.

@dnhatn dnhatn closed this Feb 5, 2019
@dnhatn dnhatn deleted the relax-assertion branch February 5, 2019 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed/Distributed A catch all label for anything in the Distributed Area. If you aren't sure, use this one. >test Issues or PRs that are addressing/adding tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants