Use unsync cache + async-aware sync primitives#2164
Merged
svyatonik merged 2 commits intorevive-new-clientfrom May 30, 2023
Merged
Use unsync cache + async-aware sync primitives#2164svyatonik merged 2 commits intorevive-new-clientfrom
svyatonik merged 2 commits intorevive-new-clientfrom
Conversation
bkontur
reviewed
May 29, 2023
serban300
approved these changes
May 30, 2023
svyatonik
added a commit
that referenced
this pull request
May 30, 2023
* Revert "Revert new client (#2153)" This reverts commit 17cf7b5. * add comment re cache to CachingClient (#2162) * do not wait for reader when sending items (#2163) * Use unsync cache + async-aware sync primitives (#2164) * use unsync cache + async-aware sync primitives * clippy * trigger CI * Revert "trigger CI" This reverts commit b5c1405.
svyatonik
pushed a commit
that referenced
this pull request
Jul 17, 2023
* Increase delay for pov-recovery * Update client/service/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Comment * FMT * Clear waiting_recovery when block is recovered or recovery failed * Introduce recovery queue that preserved insertion order * Better error logs * Decrease slot duration * Style improvements * Add option to use unordered queue * Maintain cache of finalized blocks * Wait for one relay chain slot before recovery * Make retries testable * fmt * Improve docs * Improve docs * Simplify RecoveryQueue * Remove unwanted changes * Adjust to comments * Apply suggestions from code review Co-authored-by: Bastian Köcher <git@kchr.de> * Move recovery delay into the queue * Check for finalized number * Clean up * Use timer Co-authored-by: Bastian Köcher <git@kchr.de> * Simplify implementation * Revert "Use timer" This reverts commit 3809eed840d3a09d54212f99486782ff80cdc1c9. * Properly clear `to_recover` flag --------- Co-authored-by: Bastian Köcher <git@kchr.de>
bkontur
pushed a commit
that referenced
this pull request
May 7, 2024
* Revert "Revert new client (#2153)" This reverts commit 17cf7b5. * add comment re cache to CachingClient (#2162) * do not wait for reader when sending items (#2163) * Use unsync cache + async-aware sync primitives (#2164) * use unsync cache + async-aware sync primitives * clippy * trigger CI * Revert "trigger CI" This reverts commit b5c1405.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix #2146
I've found that the sync
Cachefrom thequick_cachecrate is usingparking_lotprimitives internally. It doesn't work well with async code (be it tokio or theasync_stdenvironment), because it can block the executor threads or cause deadlocks. So I've removed usage of syncCacheand switched to unsyncCacheandasync_stdsynchrnonization primitives.Currently testing if it fixes the new-client issue (#2146).