diff --git a/server/src/main/java/org/opensearch/indices/replication/RemoteStoreReplicationSource.java b/server/src/main/java/org/opensearch/indices/replication/RemoteStoreReplicationSource.java index 7252fea044a02..82161b969326f 100644 --- a/server/src/main/java/org/opensearch/indices/replication/RemoteStoreReplicationSource.java +++ b/server/src/main/java/org/opensearch/indices/replication/RemoteStoreReplicationSource.java @@ -64,11 +64,10 @@ public void getCheckpointMetadata( RemoteSegmentMetadata mdFile = remoteDirectory.init(); // During initial recovery flow, the remote store might not // have metadata as primary hasn't uploaded anything yet. - if (mdFile == null && indexShard.state().equals(IndexShardState.STARTED) == false) { + if (mdFile == null) { listener.onResponse(new CheckpointInfoResponse(checkpoint, Collections.emptyMap(), null)); return; } - assert mdFile != null : "Remote metadata file can't be null if shard is active " + indexShard.state(); metadataMap = mdFile.getMetadata() .entrySet() .stream()