File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
server/src/main/java/org/elasticsearch/snapshots Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -939,16 +939,14 @@ private void runCheck() {
939939 if (clusterStateSnapshotEntry != null ) {
940940 for (final var shardId : snapshotShards .getValue ()) {
941941 final var clusterStateShardStatus = clusterStateSnapshotEntry .shards ().get (shardId );
942- if (clusterStateShardStatus == null ) {
943- CONSISTENCY_CHECKER_LOGGER .debug ("shard [{}] in snapshot [{}] unexpectedly not found" , shardId , snapshot );
944- } else if (clusterStateShardStatus .state ().completed () == false ) {
942+ if (clusterStateShardStatus != null && clusterStateShardStatus .state ().completed () == false ) {
945943 CONSISTENCY_CHECKER_LOGGER .debug (
946944 "shard [{}] in snapshot [{}] unexpectedly still in state [{}] after notifying master" ,
947945 shardId ,
948946 snapshot ,
949947 clusterStateShardStatus
950948 );
951- } // else shard is marked complete as expected
949+ } // else shard is marked complete as expected (the null case should be impossible)
952950 }
953951 } // else snapshot already completed & removed from cluster state
954952 }
You can’t perform that action at this time.
0 commit comments