Skip to content

Commit

Permalink
Add missing code in InternalEngine part of #10513 (#11883)
Browse files Browse the repository at this point in the history
Signed-off-by: Ashish Singh <[email protected]>
  • Loading branch information
ashking94 committed Jan 16, 2024
1 parent fb6139a commit c48fb55
Showing 1 changed file with 2 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c48fb55

Please sign in to comment.