File tree 2 files changed +6
-5
lines changed
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ impl ClientRequestProcessor {
64
64
fn get_route_info_by_topic ( & self , request : RemotingCommand ) -> RemotingCommand {
65
65
let request_header = request
66
66
. decode_command_custom_header :: < GetRouteInfoRequestHeader > ( )
67
- . unwrap ( ) ;
67
+ . expect ( "GetRouteInfoRequestHeader failed" ) ;
68
68
let namesrv_ready = self . need_check_namesrv_ready . load ( Ordering :: Relaxed )
69
69
&& TimeUtils :: get_current_millis ( ) - self . startup_time_millis
70
70
>= Duration :: from_secs ( self . namesrv_config . wait_seconds_for_service as u64 )
@@ -90,8 +90,9 @@ impl ClientRequestProcessor {
90
90
FAQUrl :: suggest_todo( FAQUrl :: APPLY_TOPIC_URL )
91
91
) ) ,
92
92
Some ( mut topic_route_data) => {
93
- if self . need_check_namesrv_ready . load ( Ordering :: Relaxed ) {
94
- self . need_check_namesrv_ready . store ( false , Ordering :: SeqCst ) ;
93
+ if self . need_check_namesrv_ready . load ( Ordering :: Acquire ) {
94
+ self . need_check_namesrv_ready
95
+ . store ( false , Ordering :: Release ) ;
95
96
}
96
97
if self . namesrv_config . order_message_enable {
97
98
//get kv config
Original file line number Diff line number Diff line change @@ -385,7 +385,7 @@ impl RouteInfoManager {
385
385
let mut found_broker_data = false ;
386
386
387
387
// Acquire read lock
388
-
388
+ let lock = self . lock . read ( ) ;
389
389
if let Some ( queue_data_map) = self . topic_queue_table . get ( topic) {
390
390
topic_route_data. queue_datas = queue_data_map. values ( ) . cloned ( ) . collect ( ) ;
391
391
found_queue_data = true ;
@@ -417,7 +417,7 @@ impl RouteInfoManager {
417
417
}
418
418
}
419
419
}
420
-
420
+ drop ( lock ) ;
421
421
debug ! ( "pickup_topic_route_data {:?} {:?}" , topic, topic_route_data) ;
422
422
423
423
if found_broker_data && found_queue_data {
You can’t perform that action at this time.
0 commit comments