Skip to content

multi-tenant: enable IMPORT for workload init in multi-tenant mode #75449

@ajstorm

Description

@ajstorm

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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-multitenancyRelated to multi-tenancyC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions