From edab3748e9d12a512e7ab1f2bc2d9292bc4b9ed1 Mon Sep 17 00:00:00 2001 From: Armin Braun Date: Fri, 25 Oct 2019 15:03:23 +0200 Subject: [PATCH] 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 --- .../main/java/org/elasticsearch/cluster/SnapshotsInProgress.java | 1 - 1 file changed, 1 deletion(-) diff --git a/server/src/main/java/org/elasticsearch/cluster/SnapshotsInProgress.java b/server/src/main/java/org/elasticsearch/cluster/SnapshotsInProgress.java index 22bee83e3482c..48efab71e0bc9 100644 --- a/server/src/main/java/org/elasticsearch/cluster/SnapshotsInProgress.java +++ b/server/src/main/java/org/elasticsearch/cluster/SnapshotsInProgress.java @@ -354,7 +354,6 @@ public ShardSnapshotStatus(StreamInput in) throws IOException { state = ShardState.fromValue(in.readByte()); if (in.getVersion().onOrAfter(SnapshotsService.SHARD_GEN_IN_REPO_DATA_VERSION)) { generation = in.readOptionalString(); - assert generation != null || state != ShardState.SUCCESS : "Received null generation for shard state [" + state + "]"; } else { generation = null; }