File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
server/src/main/java/org/elasticsearch/snapshots Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -939,14 +939,20 @@ 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 && clusterStateShardStatus .state ().completed () == false ) {
942+ if (clusterStateShardStatus == null ) {
943+ CONSISTENCY_CHECKER_LOGGER .debug (
944+ "shard [{}] in snapshot [{}] unexpectedly not found (should be impossible)" ,
945+ shardId ,
946+ snapshot
947+ );
948+ } else if (clusterStateShardStatus .state ().completed () == false ) {
943949 CONSISTENCY_CHECKER_LOGGER .debug (
944950 "shard [{}] in snapshot [{}] unexpectedly still in state [{}] after notifying master" ,
945951 shardId ,
946952 snapshot ,
947953 clusterStateShardStatus
948954 );
949- } // else shard is marked complete as expected (the null case should be impossible)
955+ } // else shard is marked complete as expected
950956 }
951957 } // else snapshot already completed & removed from cluster state
952958 }
You can’t perform that action at this time.
0 commit comments