forked from solana-labs/solana
-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
uses lazy LRU cache for ClusterNodesCache in Turbine (#2507)
Current LRU cache implementation used in the code requires an exclusive lock even on the read path due to &mut self receiver: https://docs.rs/lru/latest/lru/struct.LruCache.html#method.get Most reads do not update the cache so this write-lock can unnecessary exacerbate lock contention. The commit switches to lazy LRU cache which allows shared lock on the read path and, additionally, it is generally faster.
- Loading branch information
1 parent
39af6c0
commit 5aaa334
Showing
4 changed files
with
19 additions
and
12 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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