-
Notifications
You must be signed in to change notification settings - Fork 113
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
Add BrokerOperatorResult and RollbackStats #1505
Add BrokerOperatorResult and RollbackStats #1505
Conversation
Related to mxsm#1376 Add `BrokerOperatorResult` and `RollbackStats` features to the project. * **rocketmq-broker/src/processor/admin_broker_processor.rs** - Add `BrokerOperatorResult` and `RollbackStats` to the imports. * **rocketmq-tools/src/admin/mq_admin_ext.rs** - Implement `BrokerOperatorResult` and `RollbackStats` in the `MQAdminExt` trait. - Update method signatures to include `BrokerOperatorResult` and `RollbackStats`. * **rocketmq-tools/src/admin/mq_admin_ext_async.rs** - Implement `BrokerOperatorResult` and `RollbackStats` in the `MQAdminExtLocal` trait. - Update method signatures to include `BrokerOperatorResult` and `RollbackStats`.
WalkthroughThe changes in this pull request involve enhancements to the Changes
Possibly related issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
🔊@vishwamartur 🚀Thanks for your contribution 🎉. CodeRabbit(AI) will review your code first 🔥 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
rocketmq-tools/src/admin/mq_admin_ext_async.rs (1)
225-229
: LGTM: Consistent async implementationsThe async versions of the methods maintain perfect symmetry with their synchronous counterparts in the
MQAdminExt
trait, ensuring a consistent API across both sync and async contexts.Consider documenting the relationship between these async methods and their sync counterparts in the trait documentation to help users understand when to use each version.
Also applies to: 254-260, 278-283
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (3)
rocketmq-broker/src/processor/admin_broker_processor.rs
(1 hunks)rocketmq-tools/src/admin/mq_admin_ext.rs
(4 hunks)rocketmq-tools/src/admin/mq_admin_ext_async.rs
(4 hunks)
🔇 Additional comments (4)
rocketmq-broker/src/processor/admin_broker_processor.rs (1)
47-48
: LGTM: Clean import additions
The new imports for BrokerOperatorResult
and RollbackStats
are properly placed with other protocol imports and are required for the new functionality being added to the traits.
rocketmq-tools/src/admin/mq_admin_ext.rs (2)
41-42
: LGTM: Clean import additions
The new imports for BrokerOperatorResult
and RollbackStats
are properly placed with other protocol imports and are required for the new trait methods.
210-214
: Verify concurrent method implementations
The newly added methods enhance the trait with concurrent operations for topic deletion and offset management. Please ensure:
- The concurrent implementations (
delete_topic_in_broker_concurrent
andreset_offset_new_concurrent
) properly handle parallel execution and error aggregation. - The old implementation (
reset_offset_by_timestamp_old
) is maintained for backward compatibility.
Let's verify the usage of these methods:
Also applies to: 239-245, 263-268
rocketmq-tools/src/admin/mq_admin_ext_async.rs (1)
40-41
: LGTM: Clean import additions
The new imports for BrokerOperatorResult
and RollbackStats
are properly placed with other protocol imports and are required for the new async trait methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vishwamartur Hi thanks for your contribution. please use cargo fmt to format the code. to fix CI error
@vishwamartur This is not just about removing the comments from the trait. You need to convert the Java file from the Java version into a Rust struct and place it in the corresponding API directory. You will need to create this directory yourself. The example I provided is just a reference. |
Related to #1376
Add
BrokerOperatorResult
andRollbackStats
features to the project.BrokerOperatorResult
andRollbackStats
to the imports.BrokerOperatorResult
andRollbackStats
in theMQAdminExt
trait.BrokerOperatorResult
andRollbackStats
.BrokerOperatorResult
andRollbackStats
in theMQAdminExtLocal
trait.BrokerOperatorResult
andRollbackStats
.Summary by CodeRabbit
New Features
Bug Fixes
Documentation
MQAdminExt
andMQAdminExtLocal
traits for clarity and usability.