Skip to content

Commit d09228f

Browse files
author
Kamal Nayan
committed
Made the segment sync to remote async
Signed-off-by: Kamal Nayan <askkamal@amazon.com>
1 parent d835bca commit d09228f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

server/src/main/java/org/opensearch/index/shard/ReleasableRetryableRefreshListener.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ public final void afterRefresh(boolean didRefresh) throws IOException {
6464
return;
6565
}
6666
runAfterRefreshExactlyOnce(didRefresh);
67-
runAfterRefreshWithPermit(didRefresh, () -> {});
67+
this.threadPool.schedule(
68+
() -> runAfterRefreshWithPermit(didRefresh, () -> {}),
69+
new TimeValue(0, TimeUnit.SECONDS),
70+
getRetryThreadPoolName()
71+
);
6872
}
6973

7074
/**

0 commit comments

Comments
 (0)