Skip to main content

Module keys

Module keys 

Source
Expand description

Hashed keys that scope rows in the search tables.

Each key is SHA-256 over length-prefixed parts, truncated to 64 bits. Stored rows carry these values, so changing the hash requires a full reindex.

Collisions are mostly harmless: searches filter the anchor on its real tenant/project columns and join other tables by the unique res_key, so a collision only makes an index scan read rows that get discarded. The one harmful case, two parameters in one project sharing an identity, is caught by check_identities.

Functions§

check_identities
Fails if two distinct param_urls hash to the same identity.
param_identity
Identifies a parameter’s rows in the shared tables, in place of its URL.
scope_key
Scope of a resource type table row (one tenant’s project). Leads every index on those tables.