diff --git a/server/src/main/java/org/opensearch/index/engine/InternalEngine.java b/server/src/main/java/org/opensearch/index/engine/InternalEngine.java index 88b58403a8ac6..afdf40f5339c6 100644 --- a/server/src/main/java/org/opensearch/index/engine/InternalEngine.java +++ b/server/src/main/java/org/opensearch/index/engine/InternalEngine.java @@ -2032,22 +2032,8 @@ private void refreshLastCommittedSegmentInfos() { } @Override - public void rollTranslogGeneration() throws EngineException { - try (ReleasableLock ignored = readLock.acquire()) { - ensureOpen(); - translogManager().getTranslog().rollGeneration(); - translogManager().getTranslog().trimUnreferencedReaders(); - } catch (AlreadyClosedException e) { - failOnTragicEvent(e); - throw e; - } catch (Exception e) { - try { - failEngine("translog trimming failed", e); - } catch (Exception inner) { - e.addSuppressed(inner); - } - throw new EngineException(shardId, "failed to roll translog", e); - } + public void rollTranslogGeneration() throws EngineException, IOException { + translogManager().rollTranslogGeneration(); } @Override