README for migration workflows#3357
Conversation
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3357 +/- ##
==========================================
- Coverage 59.19% 59.19% -0.01%
==========================================
Files 2097 2097
Lines 172509 172509
==========================================
- Hits 102119 102118 -1
- Misses 61538 61539 +1
Partials 8852 8852
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
| - [router_builder.go](router_builder.go) holds the per-mode builders (`buildMigrateEVMRouter`, `buildEVMMigratedRouter`, `buildMigrateAllButBankRouter`, `buildAllMigratedButBankRouter`, `buildMigrateBankRouter`); the per-mode ASCII data-flow diagrams in that file are the operational spec for "what writes where on each block." | ||
| - [thread_safe_router.go](thread_safe_router.go) wraps a built router so external `Read` calls and `ApplyChangeSets` are serialized. | ||
|
|
||
| The `MigrationManager` itself is *not* safe for concurrent use; callers must not share one across goroutines without external synchronization. [`BuildRouter`](router_builder.go) wraps every router it returns in [`NewThreadSafeRouter`](thread_safe_router.go), so callers that go through `BuildRouter` get a thread-safe handle for free. |
There was a problem hiding this comment.
in the migration_manager.go, the comments says MigrationManager is safe for concurrent use
There was a problem hiding this comment.
I realized there is a race condition when we move the data. If somebody attempts to read that data while it is moving, they may observe a phantom "not found". The current godoc on the MigrationManager is out of date, and is fixed in my feature branch. However, that branch got really big, so I'm merging things incrementally (which is why the doc isn't fixed in this branch).
Describe your changes and provide context
Add a readme in the migration package documenting migration workflows.
To view README in rendered format, visit this link (recommended)
https://github.com/sei-protocol/sei-chain/blob/cjl/migration-readme/sei-db/state_db/sc/migration/README.md
Testing performed to validate your change