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

feat(meta/upgrade): meta data upgrade program #9489

Merged
merged 2 commits into from Jan 16, 2023

Conversation

drmingdrmer
Copy link
Member

@drmingdrmer drmingdrmer commented Jan 6, 2023

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/

Summary

feat(meta-upgrade): meta data upgrade program

What it does:

This program load meta-service data from a raft-dir and upgrade TableMeta to new version and write them back.

Both in raft-log data and in state-machine data will be converted.

Usage:

databend-meta-upgrade-2023-01-15 --cmd upgrade --raft-dir "<./your/raft-dir/>"

Changelog

Related Issues

@vercel
Copy link

vercel bot commented Jan 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated
databend ⬜️ Ignored (Inspect) Jan 16, 2023 at 1:54PM (UTC)

@mergify mergify bot added the pr-feature this PR introduces a new feature to the codebase label Jan 6, 2023
@drmingdrmer drmingdrmer marked this pull request as ready for review January 6, 2023 11:31
@sundy-li
Copy link
Member

sundy-li commented Jan 6, 2023

can we merge the binary into metactl and use args to dispatch ?

@drmingdrmer
Copy link
Member Author

can we merge the binary into metactl and use args to dispatch ?

This program is not meant to be used after the upgrade is done. If, in the future, there is another data format upgrade there should be another standalone program. Putting all of these functions into one program is clumsy.

And this program depends on a former version of databend, which will increase building time of metactl.

@Xuanwo
Copy link
Member

Xuanwo commented Jan 9, 2023

This program is not meant to be used after the upgrade is done.

If so, how about changing the name to databend-upgrader-from-v0.8 or databend-upgrader-v1? We can add other upgrade logic if needed (for example, rebuild some table index).

@drmingdrmer drmingdrmer marked this pull request as draft January 9, 2023 12:15
@drmingdrmer drmingdrmer force-pushed the 45-demo-rewrite-meta branch 3 times, most recently from 213fce7 to e3730a6 Compare January 16, 2023 13:32
@drmingdrmer drmingdrmer changed the title feat(meta-rewrite): meta data upgrade program: metarewrite feat(meta-rewrite): meta data upgrade program Jan 16, 2023
@drmingdrmer drmingdrmer changed the title feat(meta-rewrite): meta data upgrade program feat(meta/upgrade): meta data upgrade program Jan 16, 2023
**What it does**:

This program load meta-service data from a `raft-dir` and upgrade TableMeta to new version and write them back.

Both in raft-log data and in state-machine data will be converted.

Usage:

- Shut down databend-meta
- Backup the data: https://databend.rs/doc/deploy/metasrv/metasrv-backup-restore
- Build it with `cargo build --bin databend-meta-upgrade-2023-01-15` and run it:

```text
databend-meta-upgrade-2023-01-15 --cmd upgrade --raft-dir "<./your/raft-dir/>"
```
@drmingdrmer drmingdrmer marked this pull request as ready for review January 16, 2023 13:59
@drmingdrmer drmingdrmer merged commit 1905aa5 into datafuselabs:main Jan 16, 2023
@drmingdrmer drmingdrmer deleted the 45-demo-rewrite-meta branch January 16, 2023 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-feature this PR introduces a new feature to the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants