We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1398524 commit 8645976Copy full SHA for 8645976
server/src/main/java/org/elasticsearch/cluster/metadata/IndexReshardingState.java
@@ -181,6 +181,9 @@ public static TargetShardState readFrom(StreamInput in) throws IOException {
181
private final TargetShardState[] targetShards;
182
183
Split(SourceShardState[] sourceShards, TargetShardState[] targetShards) {
184
+ // The resharding metadata is deleted when the last source shard transitions to done
185
+ assert Arrays.stream(sourceShards).allMatch((state) -> state == SourceShardState.DONE) == false;
186
+
187
this.sourceShards = sourceShards;
188
this.targetShards = targetShards;
189
0 commit comments