[storage/qmdb] Coordinate state sync finalization#3439
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
commonware-mcp | 79a8184 | Mar 23 2026, 05:43 PM |
| update_receiver: Option<mpsc::Receiver<Target<DB::Digest>>>, | ||
|
|
||
| /// Optional receiver for explicit finish requests. | ||
| finish_receiver: Option<mpsc::Receiver<()>>, |
There was a problem hiding this comment.
nit: I was inconsistent with _rx/_tx vs _receiver/_sender -- should we take this opportunity to make them all _rx/_tx? i.e. change the field names here to match those in the config
There was a problem hiding this comment.
Unified the names on _rx / _tx.
eb2a35f to
e62376c
Compare
Deploying monorepo with
|
| Latest commit: |
79a8184
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f200b816.monorepo-eu0.pages.dev |
| Branch Preview URL: | https://cl-coordinate-sync.monorepo-eu0.pages.dev |
danlaine
left a comment
There was a problem hiding this comment.
Would you mind adding tests for:
- Finish signal arrives before target reached
- Caller drops
finish_txwithout having sent a signal - Caller drops
reached_target_rxwithout having received a signal
Otherwise lgtm
361ad9a to
79a8184
Compare
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #3439 +/- ##
==========================================
- Coverage 95.65% 95.65% -0.01%
==========================================
Files 421 421
Lines 148789 148877 +88
Branches 3523 3530 +7
==========================================
+ Hits 142320 142401 +81
- Misses 5335 5340 +5
- Partials 1134 1136 +2
... and 7 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Overview
Adds explicit finish coordination to QMDB's state sync engine and exposes reached-target notifications so external orchestration can coordinate multiple databases syncing towards a unified set of targets.
Motivation
In #3381, we store the state root and range of each managed database in each block that is formed. When state syncing multiple databases, we must finish state sync for each DB at the same point. To synchronize these tasks, we need:
With this, we can hold off the completion of state sync for a set of databases until the full set has converged on the set of targets.