-
Notifications
You must be signed in to change notification settings - Fork 21.5k
Description
Rationale
Why should this feature exist?
Stop blocking on async IO Trie operations if not needed.
Very similar to futures.
Sequential consistency: job Trie updates guaranteed to execute in order they are called. So AsyncTrie is not multiple writer thread safe but is multiple reader thread safe.
Design is here: #22667 (comment)
Implementation
I will implement this feature, and it can be adopted as a replacement for the entire Trie prefetcher thingy.
(Replace the subfetcher with an AsyncTrie, make prefetch called from TriePrefetcher merely call getAsync() sequentially, and eventually it will be able to return get() for that node with microsecond latency - 100ns non-sequential RAM read per node lookup from root ~ 0.7us per lookup.)
AsyncTrie can replace all other instances of Trie, or not.
By default AsyncTrie is a secure Trie, I will not decouple the impls for simplicity.
However, AsyncTrie has extra methods than Trie.