Skip to content

Commit

Permalink
Remove Incorrect Assertion from SnapshotsInProgress (elastic#47458)
Browse files Browse the repository at this point in the history
This relates to the effort towards elastic#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 elastic#47406
  • Loading branch information
original-brownbear committed Oct 25, 2019
1 parent 486794f commit e856bd2
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e856bd2

Please sign in to comment.