Skip to content

Commit

Permalink
Close RemoteStorePinnedTimestampService on Node.close() (#16228) (#16234
Browse files Browse the repository at this point in the history
)

(cherry picked from commit 96082f7)

Signed-off-by: Sachin Kale <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 4bb820f commit 6ba121e
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 @@ -1862,6 +1862,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 @@ -1892,6 +1893,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 6ba121e

Please sign in to comment.