In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you how to receive messages from the ceph SimpleMessenger module. I hope you will get something after reading this article. Let's discuss it together.
The reception of OSD server messages starts with the messenger::add_dispatcher_head (Dispatcher * d) function in OSD::init ().
| |-358 void add_dispatcher_head (Dispatcher * d) {| | 359 bool first = dispatchers.empty (); | | 360 dispatchers.push_front (d); | | 361 if (d-> ms_can_fast_dispatch_any ()) | | 362 fast_dispatchers.push_front (d); | | 363 if (first) | | 364 ready () | / / if dispatcher list is empty, start SimpleMessenger::ready. Not empty to prove that SimpleMessenger has been started | | 365}
In SimpleMessenger::ready (), start DispatchQueue to wait for mqueue, and start the accepter receive thread if the port is bound
76 void SimpleMessenger::ready ()-77 {| 78 ldout (cct,10) reader (); return 0;} | 53} reader_thread
In the Pipe::reader function, different types of messages are received according to tag. If it is a CEPH_MSGR_TAG_MSG type message, call read_message to receive the message and add the message to the mqueue.
Void Pipe::reader () {pipe_lock.Lock (); if (state = = STATE_ACCEPTING) {accept (); / / enter this function for the first time to process assert (pipe_lock.is_locked ());} / / loop. While (state! = STATE_CLOSED & & state! = STATE_CONNECTING) {assert (pipe_lock.is_locked ());. . Else if (tag = = CEPH_MSGR_TAG_MSG) {ldout (msgr- > cct,20) cct,10) cct- > _ conf- > ms_inject_delay_max * (double) (rand ()% 10000) / 10000.0; lsubdout (msgr- > cct, ms, 1)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.