-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[core/state] Prefetch Trie Nodes Concurrently (#372)
* make prefetcher thread-safe * outline TODOs * add more TODOs * add more TODOs * update miner to use prefetcher * remove Copy2 * work on refactoring prefetcher for concurrent use * keep on keeping on * spec multi-trie * limit prefetching across all subfetchers * making progress * add functionality to wait * remove addressed TODOs * rename sm * more cleanup * move term to mt * more moving around * move loop into prefetcher * more cleanup * outline todo for using a single queue * working through single channel * continuing refactor * make sure to return copy * change name to trie orchestrator * more progress on revamp * skip prefetch if to is nil * start task processing * remove unnecessary changes * add more stop behavior * add comment for miner prefetcher * add comments for const * tests passing locally * cleanup usage of wg * track time spent waiting on fetcher * track skips * nit on prefetcher * don't clear state channel * cleanup restore outstanding requests * add debugging logs * remove verbose logging * ensure inner loop uses different variables * clean up var naming * replace panics with logs * set target task size as fixed * remove loop checks * clearer metrics tracking * use bounded workers * use cancelable context * copy meter * add doneLock * add more comments * simplify bounded workers * track outstanding work * Stop -> Wait * allow copies up to maxConcurrentReads * add largest load metric * lint * respect metrics enabled * track num fetchers * build works * fix prefetcher test * don't clear pending tasks when waiting * cleanup trie prefetcher scale up * update tests with parallelism * use spawner instead of spawn * fix more tests * fix shutdown stall * update default parallelism to 48 * spawn trie per key * change prefetcher parallelism to 16 * add TODO * remove context from bounded workers * remove context from bounded workers * remove delivery metrics * handle shutdown in wait * remove extra locking * rename var * update comments around shutdown path * reorder channel vars * use processingTasks instead of outstandingRequests * fix comment on panic * ensure idle workers are fed first * try live copy first * remove unnecessary waitgroup * honor stop
- Loading branch information
1 parent
c609216
commit 25699fc
Showing
13 changed files
with
623 additions
and
247 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
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.