-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add MigratableKVStore
trait
#3481
Open
tnull
wants to merge
15
commits into
lightningdevkit:main
Choose a base branch
from
tnull:2024-12-add-kvstore-migration-ext
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add MigratableKVStore
trait
#3481
tnull
wants to merge
15
commits into
lightningdevkit:main
from
tnull:2024-12-add-kvstore-migration-ext
Conversation
This file contains 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
.. which will be used for generic `KVStore`-to-`KVStore` migration logic.
.. which we'll be reusing shortly.
tnull
force-pushed
the
2024-12-add-kvstore-migration-ext
branch
from
December 12, 2024 12:35
98239df
to
b75d953
Compare
Added a migration util method and a test for |
TheBlueMatt
reviewed
Dec 12, 2024
tnull
force-pushed
the
2024-12-add-kvstore-migration-ext
branch
from
December 12, 2024 18:05
877a636
to
bbcd31c
Compare
Addressed pending comments, let me know if I can squash fixups. |
tnull
force-pushed
the
2024-12-add-kvstore-migration-ext
branch
from
December 12, 2024 18:33
bbcd31c
to
adcbd91
Compare
G8XSU
reviewed
Dec 12, 2024
G8XSU
reviewed
Dec 12, 2024
tnull
force-pushed
the
2024-12-add-kvstore-migration-ext
branch
from
December 12, 2024 21:13
adcbd91
to
f391296
Compare
G8XSU
reviewed
Dec 12, 2024
G8XSU
reviewed
Dec 12, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm, mod nits.
We implement the new interface on `FilesystemStore`, in particular `list_all_keys`.
.. allowing to migrate data from one store to another.
tnull
force-pushed
the
2024-12-add-kvstore-migration-ext
branch
from
December 13, 2024 08:46
f391296
to
ecdacd3
Compare
Addressed pending feedback. |
Feel free to squash, IMO. |
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.
Closes #3387
We add a
MigratableKVStore
trait (suggestion for better naming are welcome) that describes methods required to write generalizedKVStore
-to-KVStore
migration logic. In particular, it adds afn list_all_keys
method that exhaustively lists all keys stored, which then can be used by a utility to transfer all of them to the new store before deleting the old state.We implement this new trait for
FilesystemStore
.TODOs (draft until then):FilesystemStore
toFilesystemStore
migration.Should be ready for review.