Skip to content

Commit

Permalink
Fix testMasterFailoverDuringStaleIndicesCleanup (elastic#83018)
Browse files Browse the repository at this point in the history
We could run into the edge case where the delete randomly gets
queued after the snapshot so we don't trigger a stale index
cleanup as expected, never try to delete any data files and thus
fail on waiting for a block on data files.

Closes elastic#83014
  • Loading branch information
original-brownbear authored Jan 25, 2022
1 parent 18e40fc commit d8044bb
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1083,9 +1083,10 @@ public void testMasterFailoverDuringStaleIndicesCleanup() throws Exception {
masterName
);

// wait for the delete to show up in the CS so that the below snapshot is queued after it for sure
awaitNDeletionsInProgress(1);
final ActionFuture<CreateSnapshotResponse> snapshotFuture = startFullSnapshotFromDataNode(repoName, "new-full-snapshot");
waitForBlock(masterName, repoName);
awaitNDeletionsInProgress(1);
awaitNumberOfSnapshotsInProgress(1);
networkDisruption.startDisrupting();
ensureStableCluster(3, dataNode);
Expand Down

0 comments on commit d8044bb

Please sign in to comment.