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

chore: impl KvBackend for MetaPeerClient #3076

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

lyang24
Copy link
Collaborator

@lyang24 lyang24 commented Jan 3, 2024

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

This pr intended to implement KvBackend trait for MetaPeerClient.

Please explain IN DETAIL what the changes are in this PR and why they are needed:
This pr fixes the todo lefted in #3046

  • Summarize your change

This pr does a few things:

  1. existing struct's impl such as range, batch_get is moved into KvBackend trait impl.
  2. This pr also implement TxnService for MetaPeerClient as prerequisite for KvBackend trait.
  3. remove the struct's get impl and use KvBackend trait's default get impl.
  4. MetaPeerClient does not support mutable method (i.e. put, delete) it will return unsupported error when these methods get called. Please note the status code of the unsupported error is actually 1003 internal instead of 1001 as documented in the public api.
  • How does this PR work? Need a brief introduction for the changed logic (optional)
  • Describe clearly one logical change and avoid lazy messages (optional)
  • Describe any limitations of the current code (optional)

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR does not require documentation updates.

Refer to a related PR or issue link (optional)

@github-actions github-actions bot added the docs-required This change requires docs update. label Jan 3, 2024
@lyang24 lyang24 changed the title chore: impl KvBackend for MetaPeerClient chore: impl KvBackend for MetaPeerClient (wip) Jan 3, 2024
@lyang24 lyang24 force-pushed the kvbackend4metaclient branch from e9d9f57 to 8f1a948 Compare January 4, 2024 20:38
@github-actions github-actions bot added docs-not-required This change does not impact docs. and removed docs-required This change requires docs update. labels Jan 5, 2024
@lyang24 lyang24 force-pushed the kvbackend4metaclient branch from 8f1a948 to f41ad80 Compare January 7, 2024 20:39
@lyang24 lyang24 marked this pull request as ready for review January 7, 2024 20:50
@lyang24 lyang24 changed the title chore: impl KvBackend for MetaPeerClient (wip) chore: impl KvBackend for MetaPeerClient Jan 7, 2024
Copy link

codecov bot commented Jan 7, 2024

Codecov Report

Attention: 114 lines in your changes are missing coverage. Please review.

Comparison is base (b9302e4) 85.58% compared to head (0c24374) 85.00%.
Report is 43 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3076      +/-   ##
==========================================
- Coverage   85.58%   85.00%   -0.59%     
==========================================
  Files         805      818      +13     
  Lines      130658   133901    +3243     
==========================================
+ Hits       111822   113820    +1998     
- Misses      18836    20081    +1245     

@WenyXu WenyXu requested a review from fengjiachun January 9, 2024 06:58
Copy link
Contributor

@fengys1996 fengys1996 left a comment

Choose a reason for hiding this comment

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

Rest LGTM. Thank u, @lyang24

src/meta-srv/src/cluster.rs Show resolved Hide resolved
@lyang24 lyang24 force-pushed the kvbackend4metaclient branch from f41ad80 to 0c24374 Compare January 10, 2024 05:16
Copy link
Collaborator

@fengjiachun fengjiachun left a comment

Choose a reason for hiding this comment

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

LGTM

@fengjiachun fengjiachun added this pull request to the merge queue Jan 10, 2024
Merged via the queue into GreptimeTeam:main with commit d521bc9 Jan 10, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required This change does not impact docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants