Skip to content
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 #2170]🐛Fix BatchUnregistrationService not started when Name server start #2171

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions rocketmq-namesrv/src/route/batch_unregistration_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/
use rocketmq_remoting::protocol::header::namesrv::broker_request::UnRegisterBrokerRequestHeader;
use rocketmq_rust::ArcMut;
use tracing::info;
use tracing::warn;

use crate::bootstrap::NameServerRuntimeInner;
Expand Down Expand Up @@ -53,6 +54,7 @@
let mut rx = self.rx.take().expect("rx is None");
let limit = 10;
tokio::spawn(async move {
info!(">>>>>>>>BatchUnregistrationService started<<<<<<<<<<<<<<<<<<<");

Check warning on line 57 in rocketmq-namesrv/src/route/batch_unregistration_service.rs

View check run for this annotation

Codecov / codecov/patch

rocketmq-namesrv/src/route/batch_unregistration_service.rs#L57

Added line #L57 was not covered by tests
loop {
let mut unregistration_requests = Vec::with_capacity(limit);
tokio::select! {
Expand Down
1 change: 1 addition & 0 deletions rocketmq-namesrv/src/route/route_info_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1207,6 +1207,7 @@
//! start client connection disconnected listener
pub fn start(&self, receiver: broadcast::Receiver<SocketAddr>) {
let mut inner = self.name_server_runtime_inner.clone();
self.un_register_service.mut_from_ref().start();

Check warning on line 1210 in rocketmq-namesrv/src/route/route_info_manager.rs

View check run for this annotation

Codecov / codecov/patch

rocketmq-namesrv/src/route/route_info_manager.rs#L1210

Added line #L1210 was not covered by tests
let mut receiver = receiver;
tokio::spawn(async move {
while let Ok(socket_addr) = receiver.recv().await {
Expand Down
Loading