Skip to content

Commit

Permalink
Close RemoteStorePinnedTimestampService on Node.close() (opensearch-p…
Browse files Browse the repository at this point in the history
…roject#16228)

Signed-off-by: Sachin Kale <[email protected]>
  • Loading branch information
sachinpkale authored Oct 8, 2024
1 parent aad325f commit 96082f7
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 @@ -1868,6 +1868,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 @@ -1898,6 +1899,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 96082f7

Please sign in to comment.