Skip to content

Commit edab374

Browse files
Remove Incorrect Assertion from SnapshotsInProgress (#47458) (#48514)
This relates to the effort towards #46250. We added tracking of the shard generation for successful snapshots to `8.0`. This assertion isn't correct though. While an `8.0` master won't create an entry with sucess state and a null shard generation it may still (on e.g. master failover) send a success entry created by a 7.x master with a `null` generation over the wire. Closes #47406
1 parent 3fb3397 commit edab374

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

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

-1
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,6 @@ public ShardSnapshotStatus(StreamInput in) throws IOException {
354354
state = ShardState.fromValue(in.readByte());
355355
if (in.getVersion().onOrAfter(SnapshotsService.SHARD_GEN_IN_REPO_DATA_VERSION)) {
356356
generation = in.readOptionalString();
357-
assert generation != null || state != ShardState.SUCCESS : "Received null generation for shard state [" + state + "]";
358357
} else {
359358
generation = null;
360359
}

0 commit comments

Comments
 (0)