-
Notifications
You must be signed in to change notification settings - Fork 4.1k
multi-tenant: enable IMPORT for workload init in multi-tenant mode #75449
Copy link
Copy link
Closed
Labels
A-multitenancyRelated to multi-tenancyRelated to multi-tenancyC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Description
Currently workload init does not support IMPORT as a data loader option when running in multi-tenant mode. Instead, the following error gets returned:
cockroach workload init tpcc --warehouses=10 --data-loader=IMPORT --partitions=3 --survival-goal zone --regions=europe-west1,us-east1,us-west1 'postgresql://root@127.0.0.1:26257/tpcc?sslmode=disable'
I220124 16:39:50.808709 1 ccl/workloadccl/fixture.go:345 [-] 1 starting import of 9 tables
Error: importing fixture: pq: unimplemented: operation is unsupported in multi-tenancy mode
This error is being triggered by the fixture code, which is trying to determine how much to parallelize the IMPORT, using a query of the gossip_liveness table, which is not visible to tenants.
cockroach/pkg/ccl/workloadccl/fixture.go
Line 382 in 09abc26
| if err := sqlDB.QueryRow(numNodesQuery).Scan(&numNodes); err != nil { |
Short term we can hard-code the numNodes here to 1, as we don't support DistSQL for IMPORTs in multi-tenant mode. Longer term however, we'll want an API which allows tenants to query the number of DistSQL pods available for these types of IMPORT jobs.
Jira issue: CRDB-12677
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-multitenancyRelated to multi-tenancyRelated to multi-tenancyC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)