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

Method open_scans

nodedb/src/bridge/quiesce/refcount.rs:87–93  ·  view source on GitHub ↗

Current open-scan count. For tests / metrics.

(&self, tenant_id: u64, collection: &str)

Source from the content-addressed store, hash-verified

85
86 /// Current open-scan count. For tests / metrics.
87 pub fn open_scans(&self, tenant_id: u64, collection: &str) -> usize {
88 let inner = self.inner.lock().expect("CollectionQuiesce mutex poisoned");
89 inner
90 .states
91 .get(&(tenant_id, collection.to_string()))
92 .map_or(0, |s| s.open_scans)
93 }
94
95 /// Whether a drain is currently in progress for this collection.
96 pub fn is_draining(&self, tenant_id: u64, collection: &str) -> bool {

Callers 1

pollMethod · 0.80

Calls 4

lockMethod · 0.80
to_stringMethod · 0.80
expectMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected