StorageManager: call shutdown before awaitTermination#3607
Open
f2prateek wants to merge 1 commit intoapache:mainfrom
Open
StorageManager: call shutdown before awaitTermination#3607f2prateek wants to merge 1 commit intoapache:mainfrom
f2prateek wants to merge 1 commit intoapache:mainfrom
Conversation
Call saveCommittedFileInfosExecutor.shutdown() before awaitTermination() in saveAllCommittedFileInfosToDB() so the executor shuts down correctly during worker shutdown. awaitTermination() only waits for the executor to finish after a shutdown has been requested. Without shutdown(), the executor keeps running and can schedule more work. From ExecutorService documentation (https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html#awaitTermination-long-java.util.concurrent.TimeUnit-): > Blocks until all tasks have completed execution "after a shutdown request", ...
afterincomparableyum
approved these changes
Feb 19, 2026
afterincomparableyum
left a comment
There was a problem hiding this comment.
LGTM as long as CI passes, thanks for your contribution!
|
@f2prateek Could you create new Jira ticket for this PR. Steps to do so are here: #1053? One of the maintainers will run the CI for you when they get the chance to do so. |
Member
|
@f2prateek, could you please create new jira ticket for this pull request which refers to #1053? I have run the CI of this pull request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Call saveCommittedFileInfosExecutor.shutdown() before awaitTermination() in saveAllCommittedFileInfosToDB() so the executor shuts down correctly during worker shutdown.
Why are the changes needed?
awaitTermination() only waits for the executor to finish after a shutdown has been requested; without shutdown(), the executor keeps running and can schedule more work.
From ExecutorService documentation:
Does this PR resolve a correctness bug?
Possibly, as it could lead to race conditions writing to RocksDB during shutdown, which could cause data loss or correctness issues.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Should be exercised by existing tests to ensure this doesn't introduce a regression.