Skip to content

Fix BlobStoreRepositoryCleanupIT Leaking Futures #69446

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 4 commits into from
Feb 24, 2021

Conversation

original-brownbear
Copy link
Member

The problem with #69434 was that during master failover
the listener might get retried after the new master has
already dropped the cleanup from the cluster state which
then conflicts with the cleanup executed by the repo consistency
checks after each test.
To prevent running into this conflict, just wait for the future
to actually return.

Closes #69434

The problem with elastic#69434 was that during master failover
the listener might get retried after the new master has
already dropped the cleanup from the cluster state which
then conflicts with the cleanup executed by the repo consistency
checks after each test.
To prevent running into this conflict, just wait for the future
to actually return.

Closes elastic#69434
@original-brownbear original-brownbear added >test Issues or PRs that are addressing/adding tests :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs v8.0.0 v7.12.0 v7.13.0 labels Feb 23, 2021
@elasticmachine elasticmachine added the Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. label Feb 23, 2021
@elasticmachine
Copy link
Collaborator

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

@@ -80,13 +90,16 @@ private String startBlockedCleanup(String repoName) throws Exception {
blockMasterFromFinalizingSnapshotOnIndexFile(repoName);

logger.info("--> starting repository cleanup");
client().admin().cluster().prepareCleanupRepository(repoName).execute();
// not running from a non-master client because shutting down a master while a request to it is pending might result in the future
Copy link
Contributor

Choose a reason for hiding this comment

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

s/not running/running/ ?

Copy link
Member Author

Choose a reason for hiding this comment

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

++

try {
cleanupFuture.get();
} catch (ExecutionException e) {
// ignored and expected
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't we be more specific about the exception that we expect here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yea definitely, sorry for the laziness, made it a proper specific assertion now :)

Copy link
Contributor

Choose a reason for hiding this comment

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

No problem! :)

@original-brownbear
Copy link
Member Author

Thanks @fcofdez all fixed now I think :)

Copy link
Contributor

@fcofdez fcofdez left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@original-brownbear
Copy link
Member Author

Thanks Francisco!

@original-brownbear original-brownbear merged commit 9ae5f99 into elastic:master Feb 24, 2021
@original-brownbear original-brownbear deleted the 69343 branch February 24, 2021 12:03
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Feb 24, 2021
The problem with elastic#69434 was that during master failover
the listener might get retried after the new master has
already dropped the cleanup from the cluster state which
then conflicts with the cleanup executed by the repo consistency
checks after each test.
To prevent running into this conflict, just wait for the future
to actually return.

Closes elastic#69434
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Feb 24, 2021
The problem with elastic#69434 was that during master failover
the listener might get retried after the new master has
already dropped the cleanup from the cluster state which
then conflicts with the cleanup executed by the repo consistency
checks after each test.
To prevent running into this conflict, just wait for the future
to actually return.

Closes elastic#69434
original-brownbear added a commit that referenced this pull request Feb 24, 2021
The problem with #69434 was that during master failover
the listener might get retried after the new master has
already dropped the cleanup from the cluster state which
then conflicts with the cleanup executed by the repo consistency
checks after each test.
To prevent running into this conflict, just wait for the future
to actually return.

Closes #69434
original-brownbear added a commit that referenced this pull request Feb 24, 2021
The problem with #69434 was that during master failover
the listener might get retried after the new master has
already dropped the cleanup from the cluster state which
then conflicts with the cleanup executed by the repo consistency
checks after each test.
To prevent running into this conflict, just wait for the future
to actually return.

Closes #69434
@original-brownbear original-brownbear restored the 69343 branch April 18, 2023 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. >test Issues or PRs that are addressing/adding tests v7.12.0 v7.13.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CI] BlobStoreRepositoryCleanupIT.testMasterFailoverDuringCleanup
4 participants