From 0a14445a68ec76d0d28998f9aa3a434cc6cd4d2d Mon Sep 17 00:00:00 2001 From: Bukhtawar Khan Date: Tue, 11 Jul 2023 14:31:15 +0530 Subject: [PATCH] Await for in-flight segments to complete transfer before hand-off Signed-off-by: Bukhtawar Khan --- .../java/org/opensearch/index/shard/IndexShard.java | 12 ------------ 1 file changed, 12 deletions(-) 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 96c49208db9db..0fb3892eb746f 100644 --- a/server/src/main/java/org/opensearch/index/shard/IndexShard.java +++ b/server/src/main/java/org/opensearch/index/shard/IndexShard.java @@ -3659,18 +3659,6 @@ private DocumentMapperForType docMapper() { return mapperService.documentMapperWithAutoCreate(); } - private void closeInternalRefreshListeners() { - for (ReferenceManager.RefreshListener internalRefreshListener : internalRefreshListeners) { - if (internalRefreshListener instanceof Closeable) { - try { - ((Closeable) internalRefreshListener).close(); - } catch (IOException e) { - e.printStackTrace(); - } - } - } - } - private EngineConfig newEngineConfig(LongSupplier globalCheckpointSupplier) throws IOException { final Sort indexSort = indexSortSupplier.get(); final Engine.Warmer warmer = reader -> {