server: ensure SQL pods have unique instance IDs within the tenant #64474
Labels
A-cc-enablement
Pertains to current CC production issues or short-term projects
A-cli-server
CLI commands that pertain to CockroachDB server processes
A-multitenancy
Related to multi-tenancy
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
X-server-triaged-202105
In the serverless / multi-tenant architecture, we need to identify different SQL pods for the same tenant.
This separation is provided by the "Instance ID" abstraction in the source code. We use the instance ID at least in 3 places:
unique_rowid()
function in SQLAs of this writing, the instance ID is not fully implemented and is fixed to a constant value. This prevents running multiple SQL pods for a single tenant.
We need to complete this by allocating a separate instance ID to each tenant process.
There are three design constraints:
The third point alone suggests that the SQL pod process should request its SQL instance ID using a RPC to the nearest KV node.
Epic CRDB-2576
The text was updated successfully, but these errors were encountered: