Skip to content
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

Migrate data store #1100

Merged
merged 12 commits into from
Sep 21, 2023
Merged

Migrate data store #1100

merged 12 commits into from
Sep 21, 2023

Conversation

timbru
Copy link
Contributor

@timbru timbru commented Sep 1, 2023

[draft] should probably be after #1099

This PR adds support to krillup to migrate data from one store to another. It seems to work both in unit test and by manual testing of the actual krillup binary.

However, in doing this work I discovered that the (hidden) runtime that is used in the synchronous kvx lib will not work with Krill - as it already has a (tokio) runtime. So that will need thought, and a separate fix and PR.

@timbru timbru marked this pull request as draft September 1, 2023 14:35
@timbru timbru linked an issue Sep 4, 2023 that may be closed by this pull request
1 task
Copy link
Contributor

@Koenvh1 Koenvh1 left a comment

Choose a reason for hiding this comment

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

Looks good.

This is a bit of a nit, but I think the flow of main could be made a bit clearer. I would abstract the actual matching of matches (i.e. line 19 of src/bin/krillup.rs and down) to another function. Now after parse_matches the code goes back to the top again. Alternatively you could inline it, or leave it as-is. I don't consider it a blocking issue, but something to perhaps consider.

Base automatically changed from non-disk-migrations-1094 to prep-0.14.0-rc1 September 21, 2023 11:17
@timbru timbru marked this pull request as ready for review September 21, 2023 13:26
@timbru timbru merged commit f03ee11 into prep-0.14.0-rc1 Sep 21, 2023
0 of 18 checks passed
@timbru timbru deleted the migrate-data-store branch September 21, 2023 13:27
timbru pushed a commit that referenced this pull request Oct 17, 2023
* Use kvx with explicit namespace type.
* Do not depend on a data dir for storage.
* Add support for data migration.
* Add command line option to migrate data to krillup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support migrating data from disk to database and vice versa
2 participants