From 98c364da1e79e5661e64192720b06490653050fd Mon Sep 17 00:00:00 2001 From: Sachin Kale Date: Tue, 18 Jul 2023 10:08:28 +0530 Subject: [PATCH] Do not trigger storeDirectory.sync in segment download flow from remote store Signed-off-by: Sachin Kale --- server/src/main/java/org/opensearch/index/shard/IndexShard.java | 1 - 1 file changed, 1 deletion(-) 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 0eede0cdc4c8d..e6a394b2108e8 100644 --- a/server/src/main/java/org/opensearch/index/shard/IndexShard.java +++ b/server/src/main/java/org/opensearch/index/shard/IndexShard.java @@ -4772,7 +4772,6 @@ private String copySegmentFiles( long checksum = Long.parseLong(uploadedSegments.get(file).getChecksum()); if (overrideLocal || localDirectoryContains(storeDirectory, file, checksum) == false) { storeDirectory.copyFrom(sourceRemoteDirectory, file, file, IOContext.DEFAULT); - storeDirectory.sync(Collections.singleton(file)); downloadedSegments.add(file); } else { skippedSegments.add(file);