Skip to content

Commit

Permalink
Fix replicas from processing checkpoints from other indices.
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Handalian <[email protected]>
  • Loading branch information
mch2 committed Feb 15, 2022
1 parent 12bf217 commit fc7ca0b
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ protected void shardOperationOnReplica(ShardPublishCheckpointRequest shardReques
ActionListener.completeWith(listener, () -> {
PublishCheckpointRequest request = shardRequest.getRequest();
logger.trace("Checkpoint received on replica {}", request);
replica.onNewCheckpoint(request, source, replicationService);
if (request.getCheckpoint().getShardId().equals(replica.shardId())) {
replica.onNewCheckpoint(request, source, replicationService);
}
// TODO: Segrep - These requests are getting routed to all shards across all indices.
// We should only publish to replicas of the updated index.
return new ReplicaResult();
});
}
Expand Down

0 comments on commit fc7ca0b

Please sign in to comment.