-
Notifications
You must be signed in to change notification settings - Fork 111
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
[ISSUE #2163]⚡️Nameserver supports batch broker unregistration #2164
Conversation
WalkthroughThe pull request introduces batch broker unregistration support in the RocketMQ name server. It modifies the Changes
Assessment against linked 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
|
🔊@mxsm 🚀Thanks for your contribution🎉! 💡CodeRabbit(AI) will review your code first🔥! Note 🚨The code review suggestions from CodeRabbit are to be used as a reference only, and the PR submitter can decide whether to make changes based on their own judgment. Ultimately, the project management personnel will conduct the final code review💥. |
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: 1
🧹 Nitpick comments (1)
rocketmq-namesrv/src/route/route_info_manager.rs (1)
151-153
: Consider adding metrics for batch processing.To monitor the effectiveness of the batch processing implementation, consider adding metrics for:
- Batch sizes
- Processing times
- Success/failure rates
- Queue lengths
This will help tune the batch processing parameters for optimal performance.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
rocketmq-namesrv/src/processor/default_request_processor.rs
(1 hunks)rocketmq-namesrv/src/route/route_info_manager.rs
(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (9)
- GitHub Check: build (windows-latest, nightly)
- GitHub Check: build (windows-latest, stable)
- GitHub Check: build (macos-latest, nightly)
- GitHub Check: build (macos-latest, stable)
- GitHub Check: test
- GitHub Check: build (ubuntu-latest, nightly)
- GitHub Check: build
- GitHub Check: build (ubuntu-latest, stable)
- GitHub Check: auto-approve
🔇 Additional comments (4)
rocketmq-namesrv/src/processor/default_request_processor.rs (1)
337-346
: Well implemented error handling for batch submission.Good implementation of error handling with:
- Appropriate warning log for failed submissions
- Proper error response code (SystemError)
- Clear control flow
rocketmq-namesrv/src/route/route_info_manager.rs (3)
93-93
: Clean integration of BatchUnregistrationService.The new service is properly integrated with clear dependencies and field visibility.
Also applies to: 125-125
132-134
: Well structured initialization of the unregister service.The service is correctly initialized in the constructor with proper dependency injection.
Also applies to: 144-144
151-153
: Clean and concise submission method implementation.The
submit_unregister_broker_request
method provides a clear interface for the batch unregistration functionality.
/*self.name_server_runtime_inner | ||
.route_info_manager_mut() | ||
.un_register_broker(vec![request_header]);*/ |
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.
🛠️ Refactor suggestion
Remove commented out code.
The commented out code should be removed rather than left in the codebase. Version control history can be used to reference the old implementation if needed.
- /*self.name_server_runtime_inner
- .route_info_manager_mut()
- .un_register_broker(vec![request_header]);*/
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2164 +/- ##
==========================================
- Coverage 28.54% 28.54% -0.01%
==========================================
Files 498 498
Lines 70992 71005 +13
==========================================
Hits 20267 20267
- Misses 50725 50738 +13 ☔ View full report in Codecov by Sentry. |
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.
LGTM
Which Issue(s) This PR Fixes(Closes)
Fixes #2163
Brief Description
How Did You Test This Change?
Summary by CodeRabbit
New Features
Improvements