-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There are two issues with DaVinci shutdown: 1. `VersionBackend#close` is calling `KafkaStoreIngestionService#shutdownStoreIngestionTask`, which would wait for up to 10s to complete the shutdown (best effort). 2. Each SIT will shutdown the partition sequentially. When shutting down a DaVinci instance, the Store Versions hosted will be shut down sequentially and if there are x number of DaVinci stores, the last store will receive the shutdown signal after 10 * x seconds, which is too late. If there are y number of partitions, based on the logs, each partition graceful shutdown would take roughly 2 seconds for a hybrid store partition, so it will take 2 * y seconds to gracefully shut down one `SIT`. For some heavy DaVinci users, they normally use multiple DaVinci stores (5+) stores and each store would use a partition count at least 20+, and based on the above calculation, it will take several mins to let DaVinci instance fully shutdown. This code change will shut down all the subscribed Stores concurrently when closing DaVinciBackend and in the meantime, for DaVinci, `SIT` will try to close the subscribed partitions concurrently as well. TODO: we can evaluate whether this concurrent shutdown is applicable to Venice Server or not. To me, it is not necessary mostly since normally, each Venice Server will host a big number of SIT and adding more concurrency in partition level won't help much since the total number of CPU cores is limited.
- Loading branch information
Showing
2 changed files
with
57 additions
and
12 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