Skip to content

Commit 217a8f8

Browse files
committed
[ISSUE #1279]⚡️Optimize name server DefaultRequestProcessor#get_all_topic_list_from_nameserver
1 parent a40e982 commit 217a8f8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rocketmq-namesrv/src/route/route_info_manager.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -721,12 +721,13 @@ impl RouteInfoManager {
721721
}
722722

723723
pub(crate) fn get_all_topic_list(&self) -> TopicList {
724+
let lock = self.lock.read();
724725
let topics = self
725726
.topic_queue_table
726727
.keys()
727728
.cloned()
728729
.collect::<Vec<CheetahString>>();
729-
730+
drop(lock);
730731
TopicList {
731732
topic_list: topics,
732733
broker_addr: None,

0 commit comments

Comments
 (0)