Repository navigation
Backport release/v6.7: Make the composite store router an atomic pointer - #4473
Conversation
`CompositeCommitStore` keeps its migration router in a plain field. `SetWriteMode` replaces it when the write mode changes, while child-store views handed out by `GetChildStoreByName` read it on every call through a provider, and those accesses weren't synchronized. The router now lives in an `atomic.Pointer` and every access goes through `loadRouter` and `storeRouter`. A new test reads through a cached child-store view across a `SetWriteMode` transition under `-race`. Behaviour and the AppHash are unchanged. (cherry picked from commit 77a50d6)
PR SummaryMedium Risk Overview Adds Reviewed by Cursor Bugbot for commit 67b7662. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
There was a problem hiding this comment.
This is a straight backport of #4470. It changes the composite store's router to an atomic.Pointer that is read and written only through loadRouter and storeRouter, so cached child-store views can read safely while SetWriteMode swaps the router. It adds a regression test that runs reads and a write-mode switch at the same time (meant for -race). Every former cs.router access is converted, sync/atomic is imported, the store is never copied by value, and the existing tests only change to call the new accessor.
Findings: 0 blocking | 0 non-blocking | 0 posted inline
Blockers
- None at the file/PR level.
Non-blocking
- None at the file/PR level.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release/v6.7 #4473 +/- ##
================================================
- Coverage 61.71% 60.72% -0.99%
================================================
Files 2171 2075 -96
Lines 189923 178821 -11102
================================================
- Hits 117206 108590 -8616
+ Misses 61837 60243 -1594
+ Partials 10880 9988 -892
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Systematic changelog re-generation for the v6.7.1 patch release. Adds the PRs merged to `release/v6.7` since the v6.7.0 changelog (#4443), as reported by `scripts/generate-changelog.sh release/v6.6 release/v6.7`: - #4473 Backport `release/v6.7`: Make the composite store router an atomic pointer - #4465 Backport `release/v6.7`: fix(seidb): keep the memIAVL nonce when state sync restores a mid-mig… - #4445 Backport `release/v6.7`: Update v6.7 changelog in prep to cut v6.7.0 - #4444 Bump version to v6.7.0 in prep for release Only the `## v6.7` PR list changes, so the `backport release/v6.7` cherry-pick applies cleanly (simulated with `git merge-tree` against `origin/release/v6.7`). Not included: #4474 (the `release/v6.7` backport of #4469), which is still open. If it lands before the cut, this list needs regenerating. Co-authored-by: Cursor <cursoragent@cursor.com>
Backport of #4470 to
release/v6.7.