forked from solana-labs/solana
-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove channel that sends roots to BlockstoreCleanupService (solana-l…
…abs#35211) Currently, ReplayStage sends new roots to BlockstoreCleanupService, and BlockstoreCleanupService decides when to clean based on advancement of the latest root. This is totally unnecessary as the latest root is cached by the Blockstore, and this value can simply be fetched. This change removes the channel completely, and instead just fetches the latest root from Blockstore directly. Moreso, some logic is added to check the latest root less frequently, based on the set purge interval. All in all, we went from sending > 100 slots/min across a crossbeam channel to reading an atomic roughly 3 times/min, while also removing the need for an additional thread that read from the channel.
- Loading branch information
Showing
3 changed files
with
74 additions
and
136 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
Oops, something went wrong.