Utility for migrating from memiavl to flatKV#3275
Open
cody-littley wants to merge 22 commits intomainfrom
Open
Utility for migrating from memiavl to flatKV#3275cody-littley wants to merge 22 commits intomainfrom
cody-littley wants to merge 22 commits intomainfrom
Conversation
added 17 commits
April 17, 2026 08:14
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3275 +/- ##
==========================================
+ Coverage 59.29% 59.38% +0.08%
==========================================
Files 2070 2075 +5
Lines 169775 170184 +409
==========================================
+ Hits 100663 101056 +393
- Misses 60321 60330 +9
- Partials 8791 8798 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
yzang2019
approved these changes
Apr 22, 2026
| newErr = e | ||
| newDone = true | ||
| case <-ctx.Done(): | ||
| return ctx.Err() |
Contributor
There was a problem hiding this comment.
Do we need to drain both channels before returning here?
| case MigrationComplete: | ||
| return len(treeNames) | ||
| } | ||
| return sort.Search(len(treeNames), func(i int) bool { |
Contributor
There was a problem hiding this comment.
I don't think tree name is guaranteed to be sorted?
| // Write the value to the new DB. | ||
| putPair(newDBPairsByStore, value.ModuleName, &proto.KVPair{Key: value.Key, Value: value.Value}) | ||
| // Delete the value from the old DB. | ||
| putPair(oldDBPairsByStore, value.ModuleName, &proto.KVPair{Key: value.Key, Delete: true}) |
Contributor
There was a problem hiding this comment.
Would recommend add a metrics how how many keys are migrated successfully
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.
Describe your changes and provide context
This PR introduces a utility for migrating data from database A to database B. It's generic so that we can encapsulate migration logic. Additionally, we can reuse this utility in the future if we ever have a future migration of similar nature.
Testing performed to validate your change
Lots of unit tests.