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

Method update_db_pressure

nodedb/src/bridge/dispatch.rs:162–171  ·  view source on GitHub ↗

Recompute and store the pressure state for a single database.

(&mut self, database_id: u64)

Source from the content-addressed store, hash-verified

160
161 /// Recompute and store the pressure state for a single database.
162 fn update_db_pressure(&mut self, database_id: u64) {
163 let state = if self.wfq.is_suspended_for(database_id) {
164 PressureState::Suspended
165 } else if self.wfq.is_throttled_for(database_id) {
166 PressureState::Throttled
167 } else {
168 PressureState::Normal
169 };
170 self.db_pressure.insert(database_id, state);
171 }
172}
173
174/// Data Plane side of a core's channel pair.

Callers 3

flush_wfqMethod · 0.80
dispatchMethod · 0.80
dispatch_to_coreMethod · 0.80

Calls 3

is_suspended_forMethod · 0.80
is_throttled_forMethod · 0.80
insertMethod · 0.45

Tested by

no test coverage detected