diff --git a/server/src/main/java/org/opensearch/indices/replication/SegmentReplicationSourceHandler.java b/server/src/main/java/org/opensearch/indices/replication/SegmentReplicationSourceHandler.java index 9aa16dc40ab06..bbe4a4c25d80d 100644 --- a/server/src/main/java/org/opensearch/indices/replication/SegmentReplicationSourceHandler.java +++ b/server/src/main/java/org/opensearch/indices/replication/SegmentReplicationSourceHandler.java @@ -136,7 +136,7 @@ public synchronized void sendFiles(GetSegmentFilesRequest request, ActionListene timer.time() ); }; - + cancellableThreads.checkForCancel(); final IndexShardRoutingTable routingTable = shard.getReplicationGroup().getRoutingTable(); ShardRouting targetShardRouting = routingTable.getByAllocationId(request.getTargetAllocationId()); if (targetShardRouting == null) {