fix: clear manager cache on sync skip#1085
Open
SmaGMan wants to merge 6 commits into
Open
Conversation
🧪 Network TestsTo run network tests for this PR, use: gh workflow run network-tests.yml -f pr_number=1085Available test options:
Test types: Results will be posted as workflow runs in the Actions tab. |
31fdaeb to
a643b1c
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1085 +/- ##
==========================================
+ Coverage 57.57% 57.69% +0.11%
==========================================
Files 464 464
Lines 77109 77449 +340
Branches 77109 77449 +340
==========================================
+ Hits 44395 44681 +286
- Misses 30701 30744 +43
- Partials 2013 2024 +11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
40873e7 to
d266b3b
Compare
cf30591 to
a37d125
Compare
d266b3b to
9c7f32e
Compare
…er block received from bc: * in this case we check blocks one by one in the cache from the first one and update gc boundary if their diffs are not required for queue restore
… to restore queue
a37d125 to
69e3707
Compare
69e3707 to
c852267
Compare
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.
On collator state sync node checks if a newer mc state is already received. If so it does not process current mc state update after sync and continue syncing. But collation manager's cache was cleared only after the sync finish. So the cache may grow infinite that may cause OOM.
This update adds the guard that clears blocks from the cache which are not required for queue restore. So even if node syncs slow and receives new blocks faster then perform sync, the cache is invalidated correctly.
Additionally added some hacks to slowdown collator operations for debug purposes:
Pull Request Checklist
NODE CONFIGURATION MODEL CHANGES
[Yes]
Added optional params that allow to slowdown collator operations.
node.config
BLOCKCHAIN CONFIGURATION MODEL CHANGES
[None]
COMPATIBILITY
Fully compatible
SPECIAL DEPLOYMENT ACTIONS
[Not Required]
PERFORMANCE IMPACT
[No impact expected]
TESTS
Unit Tests
Covered by:
Network Tests
[No coverage]
Manual Tests
Manual tests used:
"slowdown_restore_queue_ms": 100000on some node and restart itmetrics