Fix testMasterFailOverWithQueuedDeletes (#62062) (#62078)

Fixing very rare corner case where the delete retry is slow.

Closes #62031
This commit is contained in:
Armin Braun 2020-09-08 10:35:06 +02:00 committed by GitHub
parent 7d5791b6bd
commit ebd1569028
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -476,6 +476,11 @@ public class ConcurrentSnapshotsIT extends AbstractSnapshotIntegTestCase {
// rarely the master node fails over twice when shutting down the initial master and fails the transport listener // rarely the master node fails over twice when shutting down the initial master and fails the transport listener
assertThat(rex.repository(), is("_all")); assertThat(rex.repository(), is("_all"));
assertThat(rex.getMessage(), endsWith("Failed to update cluster state during repository operation")); assertThat(rex.getMessage(), endsWith("Failed to update cluster state during repository operation"));
} catch (SnapshotMissingException sme) {
// very rarely a master node fail-over happens at such a time that the client on the data-node sees a disconnect exception
// after the master has already started the delete, leading to the delete retry to run into a situation where the
// snapshot has already been deleted potentially
assertThat(sme.getSnapshotName(), is(firstSnapshot));
} }
} }
expectThrows(SnapshotException.class, snapshotThreeFuture::actionGet); expectThrows(SnapshotException.class, snapshotThreeFuture::actionGet);