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

Method drop_partition

nodedb-graph/src/sharded.rs:93–95  ·  view source on GitHub ↗

Drop a tenant's entire graph state. Returns `true` if a partition existed and was removed, `false` if the tenant had no graph state. Used by tenant-purge flows — O(1) structural deletion replaces the former "range-scan and erase every key with the `{tid}:` prefix" approach, which was both slow and coupled to the lexical encoding.

(&mut self, tid: TenantId)

Source from the content-addressed store, hash-verified

91 /// every key with the `{tid}:` prefix" approach, which was both
92 /// slow and coupled to the lexical encoding.
93 pub fn drop_partition(&mut self, tid: TenantId) -> bool {
94 self.partitions.remove(&tid).is_some()
95 }
96
97 /// Collection-scoped in-memory reclaim.
98 ///

Calls 1

removeMethod · 0.45