Unable to create hash distributed table after using master_drop_all_shards
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
This is encountered during release testing.
```sql
create table t1(a int);
select create_distributed_table('t1', 'a');
select master_drop_all_shards('t1', 'public', 't1');
create table t2(a int);
select create_distributed_table('t2', 'a');
ERROR: could not find any shards into which to copy
DETAIL: No shards exist for distributed table "t2".
HINT: Run master_create_worker_shards to create shards and try again.
```
Problem does not go away even when you open a different connection, or restart the cluster.
It can only disappear if you drop the table that `master_drop_all_shards` are issued on.
Creating distributed tables with other distribution methods seems to be fine.
Contributor guide
Assessment
This issue has not been assessed yet.