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

Method get

nodedb-mem/src/collection_arena.rs:88–94  ·  view source on GitHub ↗

Look up an existing handle without creating one. Returns `None` when the collection has no dedicated arena yet.

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

Source from the content-addressed store, hash-verified

86 /// Look up an existing handle without creating one. Returns `None` when
87 /// the collection has no dedicated arena yet.
88 pub fn get(&self, tenant_id: u64, collection: &str) -> Option<CollectionArenaHandle> {
89 let guard = self.inner.lock().ok()?;
90 guard
91 .handles
92 .get(&(tenant_id, collection.to_string()))
93 .cloned()
94 }
95}
96
97/// Build a handle, creating a new jemalloc arena when possible.

Callers 5

try_reserveMethod · 0.45
releaseMethod · 0.45
budgetMethod · 0.45
engine_pressureMethod · 0.45
get_or_createMethod · 0.45

Calls 3

lockMethod · 0.80
to_stringMethod · 0.80
okMethod · 0.45

Tested by

no test coverage detected