citusdata / citusdata/citus

Usability: Improve Error in ErrorIfCoordinatorNotAddedAsWorkerNode

Open
#4,298 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
12.8k
Forks
794
Avg merge
2d 14h
Merged PRs (30d)
31

Description

When coordinator is not added to the cluster as a worker when it should be, we give an error:

```psql
[local] talha@talha:9700-5789=# select create_citus_local_table('citus_local');
ERROR: could not find the coordinator node in metadata as it is not added as a worker
Time: 1.120 ms
```

Here it might not be clear for some users what to do.

I think it would be nice to give a hint to show what to run such as

```
To add the coordinator, run `SELECT 1 FROM master_add_node(, , groupid => 0);`
```
(We can dynamically find the ip and port and replace them in the command)

Maybe it is not desirable to add the coordinator, if so, we can also mention that in this hint/error.

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.