From 98ad5d83a6cc88137ed5f5bc4c3a36ad59dfcb3f Mon Sep 17 00:00:00 2001 From: Suraj Singh Date: Fri, 7 Apr 2023 09:06:40 -0700 Subject: [PATCH] [Segment Replication] Cancellation check before send files to prevent segrep round Signed-off-by: Suraj Singh --- .../indices/replication/SegmentReplicationSourceHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {