diff --git a/rocketmq-namesrv/src/route/route_info_manager.rs b/rocketmq-namesrv/src/route/route_info_manager.rs index ade1849a..7b9d6bfe 100644 --- a/rocketmq-namesrv/src/route/route_info_manager.rs +++ b/rocketmq-namesrv/src/route/route_info_manager.rs @@ -721,12 +721,13 @@ impl RouteInfoManager { } pub(crate) fn get_all_topic_list(&self) -> TopicList { + let lock = self.lock.read(); let topics = self .topic_queue_table .keys() .cloned() .collect::>(); - + drop(lock); TopicList { topic_list: topics, broker_addr: None,