Closed fengjiachun closed 2 weeks ago
The change focuses on refactoring and renaming functions related to MetaClient
across several Rust modules. Key adjustments include altering function names, updating client types to MetaClientRef
, and introducing enums and functions for more flexible meta client creation. The error handling is also expanded to accommodate new variants.
Files | Change Summary |
---|---|
src/cmd/src/datanode.rs , src/cmd/src/flownode.rs |
Renamed new_metasrv_client function calls to new_meta_client in implementation of StartCommand . |
.../src/datanode.rs |
Updated usage from MetaClient to MetaClientRef in Datanode . |
src/cmd/src/error.rs |
Added MetaClientInit variant to Error enum and updated status_code method. |
src/cmd/src/frontend.rs |
Added MetaClientType and reorganized client creation and error handling. |
src/flow/src/heartbeat.rs |
Renamed and refactored new_metasrv_client to new_meta_client ; updated function implementation and imports. |
src/frontend/src/instance.rs |
Replaced older client initialization logic with create_meta_client ; updated imports accordingly. |
src/meta-client/src/lib.rs |
Added MetaClientType enum and create_meta_client function for flexible client creation. |
tests-integration/src/cluster.rs |
Modified MetaKvBackend client declaration to remove Arc . |
.../examples/lock.rs |
Transitioned functions to use MetaClientRef instead of MetaClient ; introduced Arc wrapper for meta_client . |
src/meta-client/src/client.rs |
Removed Clone trait implementation from MetaClient struct. |
In the heart of code's labyrinthine groove,
Functions morph and clients prove,
Meta's echo, refined and clear,
Under rabbitβs guidance, no longer unclear. πβ¨
Enums rise, old errors cease to be,
Hopping through logic, bugs set free.
In Rust's fields, we code with glee!
[!TIP]
AI model upgrade
## `gpt-4o` model for reviews and chat is now live OpenAI claims that this model is better at understanding and generating code than the previous models. Please join our [Discord Community](https://discord.com/invite/GsXnASn26c) to provide any feedback or to report any issues.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Attention: Patch coverage is 4.68750%
with 61 lines
in your changes missing coverage. Please review.
Project coverage is 84.71%. Comparing base (
11cf9c8
) to head (41cecd3
). Report is 3 commits behind head on main.
I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
What's changed and what's your intention?
As the title and @coderabbitai said.
Checklist
Summary by CodeRabbit
Refactor
new_metasrv_client
tonew_meta_client
across several modules.MetaClientRef
instead ofMetaClient
.MetaClientType
enum andcreate_meta_client
function to support different meta client configurations.New Features
MetaClientInit
error variant for enhanced error handling.Bug Fixes
MetaClientInit
error variant.