Skip to content

Commit 8eb71ef

Browse files
committed
Fix allQueued snapshot test for deletion
1 parent 55a6907 commit 8eb71ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/main/java/org/elasticsearch/cluster/SnapshotsInProgress.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,10 +1236,10 @@ public Entry abort(BiConsumer<ShardId, ShardSnapshotStatus> abortedQueuedWithGen
12361236
boolean allQueued = true;
12371237
for (Map.Entry<ShardId, ShardSnapshotStatus> shardEntry : shards.entrySet()) {
12381238
ShardSnapshotStatus status = shardEntry.getValue();
1239-
allQueued &= status.state() == ShardState.QUEUED;
1239+
final var isQueuedWithGeneration = status.isQueuedWithGeneration();
1240+
allQueued &= (status.state() == ShardState.QUEUED && isQueuedWithGeneration == false);
12401241
if (status.state().completed() == false) {
12411242
final String nodeId = status.nodeId();
1242-
final var isQueuedWithGeneration = status.isQueuedWithGeneration();
12431243
status = new ShardSnapshotStatus(
12441244
nodeId,
12451245
// QUEUED with generation transitioned to ABORTED (incomplete) and is completed by a separate cluster state update

0 commit comments

Comments
 (0)