-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow ordered task groups for graceful shutdown
This commit allows for ordered task groups, which are comprised of shutdown token and a corresponding tracker, when performing graceful shutdown. In other words, when performing graceful shutdown, we will now fully drain task groups in order. If using graceful shutdown functionality from the "si-service" crate, then the timeout condition will apply to all task groups. Future considerations: In the future, we may want to create a manager struct to manage task groups as well as handle the shutdown for them. We may also want to switch from a flat dependency list to a dependency tree in case we want parallelism during shutdown. Using a manager struct could also help with naming task groups. Right now, we log the number of task groups being drained, but they are unnamed. It could be helpful in the future to know the order at which they are drained. Additional changes: This commit also deletes some dead comments as well as increases some shutdown logging to "info" level. In addition to that, we no longer clone the tracker used for creating LayerDB clients; we borrow it. Signed-off-by: Nick Gerace <[email protected]>
- Loading branch information
1 parent
f91836a
commit 8e345db
Showing
9 changed files
with
96 additions
and
61 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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