File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -331,12 +331,7 @@ int InputMessenger::ProcessNewMessage(
331331 " destroyed when authentication failed" ;
332332 }
333333 }
334- #if BRPC_WITH_RDMA
335- if (!m->is_read_progressive () && !rdma::FLAGS_rdma_use_polling)
336- #else
337- if (!m->is_read_progressive ())
338- #endif
339- {
334+ if (!m->is_read_progressive ()) {
340335 // Transfer ownership to last_msg
341336 last_msg.reset (msg.release ());
342337 } else {
@@ -346,6 +341,16 @@ int InputMessenger::ProcessNewMessage(
346341 num_bthread_created = 0 ;
347342 }
348343 }
344+ #if BRPC_WITH_RDMA
345+ // In RDMA polling mode, all messages must be executed in a new bthread and
346+ // not in the bthread where the polling bthread is located, because the
347+ // method for processing messages may call synchronization primitives,
348+ // causing the polling bthread to be scheduled out.
349+ if (rdma::FLAGS_rdma_use_polling) {
350+ QueueMessage (last_msg.release (), &num_bthread_created,
351+ m->_keytable_pool );
352+ }
353+ #endif
349354 if (num_bthread_created) {
350355 bthread_flush ();
351356 }
You can’t perform that action at this time.
0 commit comments