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

Method record_tenant_database

nodedb/src/data/executor/core_loop/maintenance.rs:47–53  ·  view source on GitHub ↗

Record the `TenantId → DatabaseId` mapping for a tenant seen in a request. Called by dispatch handlers when `task.request.database_id` is available so the maintenance budget tracker can look up per-database caps when iterating collections that are keyed only by `TenantId`.

(
        &mut self,
        tenant: crate::types::TenantId,
        db: nodedb_types::DatabaseId,
    )

Source from the content-addressed store, hash-verified

45 /// so the maintenance budget tracker can look up per-database caps when
46 /// iterating collections that are keyed only by `TenantId`.
47 pub(in crate::data::executor) fn record_tenant_database(
48 &mut self,
49 tenant: crate::types::TenantId,
50 db: nodedb_types::DatabaseId,
51 ) {
52 self.tenant_database_map.entry(tenant).or_insert(db);
53 }
54
55 /// Register a `TenantId → DatabaseId` mapping.
56 ///

Callers 1

execute_planMethod · 0.80

Calls 1

entryMethod · 0.80

Tested by

no test coverage detected