Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly expose trie metrics to TrieStorage callers #9004

Open
Tracked by #8997
Longarithm opened this issue May 4, 2023 · 0 comments
Open
Tracked by #8997

Explicitly expose trie metrics to TrieStorage callers #9004

Longarithm opened this issue May 4, 2023 · 0 comments
Assignees
Labels
A-storage Area: storage and databases C-housekeeping Category: Refactoring, cleanups, code quality T-core Team: issues relevant to the core team

Comments

@Longarithm
Copy link
Member

See https://near.zulipchat.com/#narrow/stream/313099-pagoda.2Fstorage/topic/handling.20storage.20metrics/near/353790811 for more details.

TODO: better explanation.

Assigning @pugachAG because we need to investigate inlining first.

@Longarithm Longarithm added C-housekeeping Category: Refactoring, cleanups, code quality A-storage Area: storage and databases T-core Team: issues relevant to the core team labels May 4, 2023
near-bulldozer bot pushed a commit that referenced this issue May 11, 2023
`TrieStorage::as_caching_storage` is a bad design because it requires all implementations of `TrieStorage` to know about `TrieCachingStorage`. We needed it to expose storage metrics and caches, see .

Here we remove majority of such calls, except two:
* call inside `set_trie_cache_mode` - can be fixed during resolving of #9004;
* calls inside prefetcher. @jakmeier do you remember how much prefetcher logic needs to know what `TrieStorage` it is using?

## Testing

Existing tests. We can't test shard cache in `test_repeated_values_count` anymore, but this makes sense, as caches are hidden implementation detail of `TrieCachingStorage`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-storage Area: storage and databases C-housekeeping Category: Refactoring, cleanups, code quality T-core Team: issues relevant to the core team
Projects
None yet
Development

No branches or pull requests

2 participants