cockroachdb / cockroachdb/cockroach

sql: Improve self-serviceability of paused IMPORT

Open
#114,807 3 comments 0 reactions 0 assignees View on GitHub
C-enhancement E-quick-win O-testcluster P-3 T-sql-queries
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

When upgrading a cluster with concurrently running IMPORTs, the IMPORT jobs may end up in a paused state due to the draining of one or more nodes. This can also leave tables in a strange state where they're neither visible, nor droppable:

```
root@localhost:26257/application/defaultdb> drop database cct_tpcc_drop cascade;
ERROR: table "customer": object state is OFFLINE instead of PUBLIC, cannot be targeted by DROP
SQLSTATE: 55000
root@localhost:26257/application/defaultdb> use cct_tpcc_drop;
SET

Time: 0ms total (execution 0ms / network 0ms)

root@localhost:26257/application/cct_tpcc_drop> show tables;
SHOW TABLES 0

Time: 33ms total (execution 33ms / network 0ms)

root@localhost:26257/application/cct_tpcc_drop> drop table customer;
ERROR: relation "customer" is offline: importing
root@localhost:26257/application/cct_tpcc_drop> show tables;
SHOW TABLES 0

Time: 36ms total (execution 36ms / network 0ms)
```

For the last error shown, it would be nice if we could provide a hint as to how to get out of this situation. We have an allusion to this in the doc [here](https://www.cockroachlabs.com/docs/v23.1/import#performance), but it's not easy to find, especially if this is your first time using IMPORT.

Internal thread [here](https://cockroachlabs.slack.com/archives/C01RX2G8LT1/p1700578546907349).

Jira issue: CRDB-33689

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.