Skip to content

Commit

Permalink
Fix failing assert in RemoteStoreReplicationSource
Browse files Browse the repository at this point in the history
Signed-off-by: Sachin Kale <[email protected]>
  • Loading branch information
Sachin Kale committed Sep 16, 2023
1 parent a57fa57 commit f45d625
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit f45d625

Please sign in to comment.