Closed discord9 closed 1 week ago
The changes introduce significant updates to the Rust client and meta-server modules. The Client
structure gets a new method for initializing PbFlowClient
, multiple components are renamed from DatanodeClients
to NodeClients
, and a new FlowRequester
struct is added for handling flow requests. Error handling is improved with a new FlowServer
variant, facilitating better management of flownode operations.
Files | Change Summaries |
---|---|
src/client/src/client.rs |
Added a new raw_flow_client method to the Client implementation, initializing and returning a PbFlowClient . |
src/client/src/client_manager.rs |
Renamed DatanodeClients to NodeClients , updated method implementations and references, and introduced a FlowRequester dependency for handling flownode requests. |
src/client/src/error.rs |
Added a new FlowServer variant to the Error enum, updated ErrorExt implementation to handle this new variant alongside others. |
src/client/src/flow.rs |
Introduced FlowRequester struct with methods for handling and inserting flow requests, implementing the Flownode trait for asynchronous operations. |
src/client/src/lib.rs |
Added a new module flow . |
src/cmd/src/frontend.rs , |
Renamed DatanodeClients to NodeClients , updated instantiation logic accordingly. |
src/meta-srv/src/.../builder.rs , |
Updated import and instantiation logic to replace DatanodeClients with NodeClients . |
src/meta-srv/src/mocks.rs , |
Renamed DatanodeClients to NodeClients , updated function signatures accordingly. |
src/meta-srv/src/procedure/tests.rs , |
Renamed DatanodeClients to NodeClients in import statements and function calls. |
tests-integration/src/cluster.rs |
Updated references from DatanodeClients to NodeClients in the client::client_manager module. |
sequenceDiagram
participant User
participant FlowRequester
participant Client
participant PbFlowClient
User->>FlowRequester: Make flow request
FlowRequester->>Client: Initialize `PbFlowClient`
Client->>PbFlowClient: Init with configurations
Client-->>FlowRequester: Return `PbFlowClient`
FlowRequester->>PbFlowClient: Handle flow request
PbFlowClient-->>FlowRequester: Flow response
FlowRequester-->>User: Return Flow response
In fields of code, where errors abound,
TheNodeClients
now elegantly surround.
WithFlowRequester
handling requests with care,
Our flows traverse, beyond compare.
Errors meet new variances, to guide the way,
In our rustling cluster, harmony will stay.
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 5.00000%
with 76 lines
in your changes missing coverage. Please review.
Project coverage is 84.77%. Comparing base (
cdd4baf
) to head (ca774e8
). Report is 5 commits behind head on main.
Do we really want to rename DatanodeClient
to NodeClient
? Datanode is a term in our database while Node
sounds like more general purpose
I see it also used for flow nodes, that's ok
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?
added
FlownodeClient
which can send requests toFlownode
in distributed modePlease explain IN DETAIL what the changes are in this PR and why they are needed:
DatanodeClients
toNodeClients
NodeManager::flownode()
forNodeClients
which return corrspondingFlownodeClient
FlownodeClient
and implFlownode
for itChecklist
Summary by CodeRabbit
New Features
FlowRequester
for handling flow requests and inserts.Improvements
DatanodeClients
toNodeClients
for consistency across the codebase.FlowServer
variant in error reporting.Refactor
DatanodeClients
toNodeClients
.