Skip to content

Commit

Permalink
Close RemoteStorePinnedTimestampService on Node.close()
Browse files Browse the repository at this point in the history
Signed-off-by: Sachin Kale <[email protected]>
  • Loading branch information
sachinpkale committed Oct 8, 2024
1 parent 146b0f7 commit 4940a0e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/src/main/java/org/opensearch/node/Node.java
Original file line number Diff line number Diff line change
Expand Up @@ -1837,6 +1837,7 @@ public synchronized void close() throws IOException {
toClose.add(() -> stopWatch.stop().start("transport"));
toClose.add(injector.getInstance(TransportService.class));
toClose.add(nodeService.getTaskCancellationMonitoringService());
toClose.add(injector.getInstance(RemoteStorePinnedTimestampService.class));

for (LifecycleComponent plugin : pluginLifecycleComponents) {
toClose.add(() -> stopWatch.stop().start("plugin(" + plugin.getClass().getName() + ")"));
Expand Down Expand Up @@ -1867,6 +1868,7 @@ public synchronized void close() throws IOException {
if (logger.isTraceEnabled()) {
toClose.add(() -> logger.trace("Close times for each service:\n{}", stopWatch.prettyPrint()));
}

IOUtils.close(toClose);
logger.info("closed");
}
Expand Down

0 comments on commit 4940a0e

Please sign in to comment.