-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql,kv: the builtin list_sql_keys_in_range emits requests outside of the tenant keyspace #95006
Copy link
Copy link
Closed
Labels
A-kv-observabilityA-multitenancyRelated to multi-tenancyRelated to multi-tenancyA-sql-builtinsSQL built-in functions and semantics thereof.SQL built-in functions and semantics thereof.C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Description
Describe the problem
The builtin function crdb_internal.list_sql_keys_in_range() currently errors out in secondary tenans
ERROR: RangeIterator failed to seek to /Meta2/"\x00": rpc error: code = Unauthenticated desc = requested key /Meta2/"\x00" not fully contained in tenant keyspace /Tenant/1{2-3}
Expected behavior
- for ranges that contain the requesting tenant's data, the builtin should work and return results without errors.
- for ranges that don't contain the requesting tenant's data, we should have a check:
- if the tenant is the system tenant, allow the request to go through
- otherwise return a clear error
Jira issue: CRDB-23269
Epic CRDB-23344
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-kv-observabilityA-multitenancyRelated to multi-tenancyRelated to multi-tenancyA-sql-builtinsSQL built-in functions and semantics thereof.SQL built-in functions and semantics thereof.C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)