Closed mxsm closed 4 months ago
🚀Thanks for your contribution🎉. CodeRabbit(AI) will review your code first🔥
The recent changes primarily aim to unify error handling across the RocketMQ project by renaming multiple error types to a generalized Error
type. This involves modifying return types, struct definitions, and import statements. Additionally, the changes introduce enhanced signal handling for different platforms and replace the logging library log
with tracing
.
Files/Modules | Change Summaries |
---|---|
rocketmq-common/src/error.rs |
Renamed SerdeJsonError enum to Error |
rocketmq-common/src/utils/serde_json_utils.rs |
Updated SerdeJsonUtils struct to use Error |
rocketmq-remoting/src/clients.rs |
Renamed RemotingError to Error in import and method returns |
rocketmq-remoting/src/clients/rocketmq_default_impl.rs |
Updated method return types to use Error |
rocketmq-remoting/src/code/broker_request_code.rs |
Renamed RemotingError enum to Error |
rocketmq-remoting/src/codec/remoting_command_codec.rs |
Replaced specific error types with Error |
rocketmq-remoting/src/error.rs |
Converted specific error structs into variants within Error |
rocketmq-remoting/src/lib.rs |
Introduced type alias Result<T, E = Error> |
rocketmq-remoting/src/protocol.rs |
Updated return types to use Error |
rocketmq-remoting/src/protocol/rocketmq_serializable.rs |
Adjusted return types to use Error |
rocketmq-remoting/src/rpc/rpc_client.rs |
Refactored RpcClientLocal to remove RpcException |
rocketmq-remoting/src/rpc/rpc_client_hook.rs |
Removed import of RpcException |
rocketmq-remoting/src/rpc/rpc_client_impl.rs |
Removed RpcException from method signatures |
rocketmq-remoting/src/rpc/rpc_client_utils.rs |
Modified set_remark_ref method |
rocketmq-remoting/src/rpc/rpc_response.rs |
Updated RpcResponse struct to use Error |
rocketmq-store/src/message_store/default_message_store.rs |
Replaced log with tracing for logging information |
rocketmq/Cargo.toml |
Added tracing as a dependency alongside tokio |
rocketmq/src/lib.rs |
Enhanced platform-specific signal handling |
Objective (Issue #767) | Addressed | Explanation |
---|---|---|
Refactor error handling across the project | ✅ | |
Enhance signal handling for Unix and Windows platforms | ✅ | |
Replace the log library with tracing |
✅ |
In the code's vast, intricate maze,
Errors now share a unified phrase.
Withtracing
we log, so clear and bright,
Signals handled with grace, day and night.
RocketMQ's paths now streamlined,
A coder's delight, so well-aligned. 🌟
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?
🚀Thanks for your contribution🎉. CodeRabbit(AI) will review your code first🔥
🚀Thanks for your contribution🎉. CodeRabbit(AI) will review your code first🔥
🚀Thanks for your contribution🎉. CodeRabbit(AI) will review your code first🔥
Which Issue(s) This PR Fixes(Closes)
Fixes #767
Brief Description
How Did You Test This Change?
Summary by CodeRabbit
Refactor
Error
.Chores
log::info
totracing::info
for better tracing capabilities.tracing
dependency alongsidetokio
.New Features
wait_for_signal()
to handle SIGINT and SIGTERM signals using tokio.