Skip to content

trie: AsyncTrie #22798

@jon-chuang

Description

@jon-chuang

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions