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: EtcdStore support chroot #2786

Closed
wants to merge 9 commits into from
Closed

feat: EtcdStore support chroot #2786

wants to merge 9 commits into from

Conversation

tisonkun
Copy link
Collaborator

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

To support chroot in etcd, we should take the ownership of KeyValues and thus modify them later.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

@tisonkun tisonkun changed the title refactor: KvPair can take etcd KeyValue feat: EtcdStore support chroot Nov 21, 2023
Signed-off-by: tison <[email protected]>
@tisonkun tisonkun marked this pull request as ready for review November 21, 2023 13:20
Signed-off-by: tison <[email protected]>
Copy link

codecov bot commented Nov 21, 2023

Codecov Report

Merging #2786 (1ad8650) into develop (a7bbd61) will decrease coverage by 0.38%.
Report is 4 commits behind head on develop.
The diff coverage is 0.00%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2786      +/-   ##
===========================================
- Coverage    84.47%   84.10%   -0.38%     
===========================================
  Files          728      729       +1     
  Lines       113352   113581     +229     
===========================================
- Hits         95756    95526     -230     
- Misses       17596    18055     +459     

@tisonkun
Copy link
Collaborator Author

cc @MichaelScofield @WenyXu this is a prerequisite for #2734. It still waits for the upstream release but we should be able to review the changes now.

src/cmd/src/cli/bench.rs Outdated Show resolved Hide resolved
src/cmd/src/cli/bench.rs Outdated Show resolved Hide resolved
src/common/meta/src/kv_backend/etcd.rs Show resolved Hide resolved
@@ -146,6 +147,43 @@ impl Txn {
self
}

pub fn prepend_root(mut self, root: &[u8]) -> Self {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we put this prepend_root function in EtcdStore's Implementation for TxnService? Other kv backend Implementations don't need it.

Also in doing so, maybe the functions chroot_key_value_with, key_strip_root and key_prepend_root can be better placed in EtcdStore.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The issue is req: TxnRequest, private. If following your suggestion, we should export this field to pub(crate)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That is, we need somehow modify the request (key).

@tisonkun tisonkun mentioned this pull request Nov 22, 2023
2 tasks
@tisonkun tisonkun marked this pull request as draft November 22, 2023 03:24
@tisonkun
Copy link
Collaborator Author

There are some subtle issues I would cover in #2734 as an e2e solution and then backport to this PR or just use #2734.

@tisonkun
Copy link
Collaborator Author

Closing in favor of #2734.

@tisonkun tisonkun closed this Nov 22, 2023
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.

2 participants