MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / poll_and_route_responses

Method poll_and_route_responses

nodedb/src/control/state/methods.rs:331–346  ·  view source on GitHub ↗

Poll responses from all Data Plane cores and route them to waiting sessions. Returns the number of responses routed — callers use this for adaptive backoff (zero ⇒ idle, sleep longer; non-zero ⇒ active, stay hot).

(&self)

Source from the content-addressed store, hash-verified

329 /// Returns the number of responses routed — callers use this for adaptive
330 /// backoff (zero ⇒ idle, sleep longer; non-zero ⇒ active, stay hot).
331 pub fn poll_and_route_responses(&self) -> usize {
332 let responses = match self.dispatcher.lock() {
333 Ok(mut d) => d.poll_responses(),
334 Err(poisoned) => {
335 warn!("dispatcher mutex poisoned, recovering");
336 poisoned.into_inner().poll_responses()
337 }
338 };
339 let count = responses.len();
340 for resp in responses {
341 if !self.tracker.complete(resp) {
342 warn!("response for unknown or cancelled request");
343 }
344 }
345 count
346 }
347}

Callers 11

spawn_with_tuningMethod · 0.80
start_multicoresMethod · 0.80
start_with_configMethod · 0.80
start_on_dir_refMethod · 0.80
spawn_response_pollerFunction · 0.80
pgwire_connect_and_queryFunction · 0.80
startMethod · 0.80
newMethod · 0.80
startMethod · 0.80

Calls 4

lockMethod · 0.80
poll_responsesMethod · 0.80
lenMethod · 0.45
completeMethod · 0.45

Tested by 5

pgwire_connect_and_queryFunction · 0.64
startMethod · 0.64
newMethod · 0.64
startMethod · 0.64