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

meta/tkv: add dump/load functions #636

Merged
merged 4 commits into from
Jul 13, 2021
Merged

meta/tkv: add dump/load functions #636

merged 4 commits into from
Jul 13, 2021

Conversation

SandyXSD
Copy link
Contributor

close #616

if err != nil {
panic(err)
}
it, err := tx.Iter(nil, nil)
Copy link
Contributor

Choose a reason for hiding this comment

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

Check with the prefix, we could use the tx.exists()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Prefix is optional

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nvm, we can also modify nextKey

Copy link
Contributor

Choose a reason for hiding this comment

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

We should give a warning if prefix is empty

Copy link
Contributor

Choose a reason for hiding this comment

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

0xFF could be used when prefix is empty

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Isn't that reserved for internal keys?

@davies davies merged commit 66c86b1 into main Jul 13, 2021
@davies davies deleted the wip-tkv-dump branch July 13, 2021 17:03
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.

Implement dump/load for KV meta
2 participants