From 5601758f9d6a51ef33c590ced2dbc6b35b83efcc Mon Sep 17 00:00:00 2001 From: Gaurav Bafna Date: Thu, 21 Mar 2024 09:27:41 +0530 Subject: [PATCH] Changing wait period for sync to 30 sec from 1 min Signed-off-by: Gaurav Bafna --- .../opensearch/remotemigration/RemotePrimaryRelocationIT.java | 2 +- server/src/main/java/org/opensearch/index/shard/IndexShard.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/internalClusterTest/java/org/opensearch/remotemigration/RemotePrimaryRelocationIT.java b/server/src/internalClusterTest/java/org/opensearch/remotemigration/RemotePrimaryRelocationIT.java index b642f3f3f82fd..b1c429a45a1a1 100644 --- a/server/src/internalClusterTest/java/org/opensearch/remotemigration/RemotePrimaryRelocationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/remotemigration/RemotePrimaryRelocationIT.java @@ -186,7 +186,7 @@ public void testMixedModeRelocation_RemoteSeedingFail() throws Exception { clusterHealthResponse = client().admin() .cluster() .prepareHealth() - .setTimeout(TimeValue.timeValueSeconds(5)) + .setTimeout(TimeValue.timeValueSeconds(45)) .setWaitForEvents(Priority.LANGUID) .setWaitForNoRelocatingShards(true) .execute() diff --git a/server/src/main/java/org/opensearch/index/shard/IndexShard.java b/server/src/main/java/org/opensearch/index/shard/IndexShard.java index c447c3e45a667..72ce858661031 100644 --- a/server/src/main/java/org/opensearch/index/shard/IndexShard.java +++ b/server/src/main/java/org/opensearch/index/shard/IndexShard.java @@ -2114,7 +2114,7 @@ public void waitForRemoteStoreSync(Runnable onProgress) { segmentUploadeCount = directory.getSegmentsUploadedToRemoteStore().size(); } try { - Thread.sleep(TimeValue.timeValueMinutes(1).seconds()); + Thread.sleep(TimeValue.timeValueSeconds(30).seconds()); } catch (InterruptedException ie) { throw new OpenSearchException("Interrupted waiting for completion of [{}]", ie); }