Closed mxsm closed 2 weeks ago
🚀Thanks for your contribution🎉. CodeRabbit(AI) will review your code first🔥
[!CAUTION]
Review failed
The pull request is closed.
The changes involve significant modifications across various components of the RocketMQ broker and remoting system. Key updates include the introduction of new request handlers for offset queries, enhancements to the AdminBrokerProcessor
, and the implementation of generic types for RPC requests and headers. Additionally, several method signatures have been updated for clarity and consistency, reflecting a shift towards more type-safe and flexible interactions within the system.
Files | Change Summary |
---|---|
rocketmq-broker/src/broker_runtime.rs , rocketmq-broker/src/processor/admin_broker_processor.rs , rocketmq-broker/src/processor/admin_broker_processor/offset_request_handler.rs |
Added broker_out_api to the BrokerRequestProcessor and AdminBrokerProcessor constructors. Introduced OffsetRequestHandler for handling maximum and minimum offset requests. Updated request handling logic to include new cases for offset queries. |
rocketmq-broker/src/processor/consumer_manage_processor.rs , rocketmq-broker/src/processor/pull_message_processor.rs , rocketmq-broker/src/processor/reply_message_processor.rs |
Updated method signatures to improve clarity by renaming methods from with_ to set_ , enhancing the understanding of their purpose. Simplified handling of request headers in PullMessageProcessor . |
rocketmq-remoting/src/clients/client.rs , rocketmq-remoting/src/net/channel.rs , rocketmq-remoting/src/remoting_server/server.rs |
Changed response_table type to ArcRefCellWrapper<HashMap<i32, ResponseFuture>> for concurrency control. Updated Channel constructor to accept response_table . Enhanced connection handling with improved state management. |
rocketmq-remoting/src/protocol/header/*.rs |
Introduced new modules and request header structures for handling "Get Max Offset" and "Get Min Offset" requests. Renamed methods in TopicRequestHeaderTrait to follow a consistent setter naming convention. |
rocketmq-remoting/src/rpc/rpc_client.rs , rocketmq-remoting/src/rpc/rpc_client_hook.rs , rocketmq-remoting/src/rpc/rpc_client_impl.rs , rocketmq-remoting/src/rpc/rpc_request.rs |
Updated RpcClientLocal and RpcClientHook traits to include generic type parameters for enhanced flexibility. Transitioned from boxed trait objects to function pointers for client hooks. Modified RpcRequest structure to be generic, accommodating various header types. |
sequenceDiagram
participant Client
participant Broker
participant OffsetRequestHandler
Client->>Broker: Request Max Offset
Broker->>OffsetRequestHandler: Handle Request
OffsetRequestHandler->>Broker: Retrieve Max Offset
Broker-->>Client: Return Max Offset
sequenceDiagram
participant Client
participant Broker
participant RpcClient
Client->>RpcClient: Send RPC Request
RpcClient->>Broker: Forward Request
Broker-->>RpcClient: Return Response
RpcClient-->>Client: Send Response
Objective | Addressed | Explanation |
---|---|---|
Support RequestCode GET_MAX_OFFSET/GET_MIN_OFFSET (30/31) (950) | ✅ |
🐰 In fields of code, I hop with glee,
New handlers sprout like flowers, you see!
With offsets and requests, we dance and play,
A better RocketMQ, brightens the day!
So raise your paws, let's celebrate,
For changes bring joy, oh isn't it great? 🎉
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 0%
with 368 lines
in your changes missing coverage. Please review.
Project coverage is 22.41%. Comparing base (
ce309a9
) to head (8d3e914
). Report is 2 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Which Issue(s) This PR Fixes(Closes)
Fixes #950
Brief Description
How Did You Test This Change?
Summary by CodeRabbit
New Features
AdminBrokerProcessor
to manage offset-related requests.Improvements
Channel
andRpcClient
to support more flexible request handling with generic types.RpcRequest
structure to accept various header types, improving type safety.Bug Fixes
Documentation
Style