Skip to content

README for migration workflows#3357

Merged
cody-littley merged 1 commit into
mainfrom
cjl/migration-readme
May 4, 2026
Merged

README for migration workflows#3357
cody-littley merged 1 commit into
mainfrom
cjl/migration-readme

Conversation

@cody-littley

@cody-littley cody-littley commented May 1, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented May 1, 2026

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMay 1, 2026, 1:25 PM

@codecov

codecov Bot commented May 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.19%. Comparing base (fb0f175) to head (56d333c).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            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              
Flag Coverage Δ
sei-db 70.41% <ø> (-0.22%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- [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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the migration_manager.go, the comments says MigrationManager is safe for concurrent use

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

@cody-littley cody-littley added this pull request to the merge queue May 4, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 4, 2026
@cody-littley cody-littley added this pull request to the merge queue May 4, 2026
Merged via the queue into main with commit cec113c May 4, 2026
42 checks passed
@cody-littley cody-littley deleted the cjl/migration-readme branch May 4, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants