mirror of https://github.com/citusdata/citus.git
Improve error message when there are no nodes for a placement
parent
4e8d07c672
commit
1961add6f9
|
@ -436,9 +436,8 @@ ResolveGroupShardPlacement(GroupShardPlacement *groupShardPlacement,
|
||||||
|
|
||||||
if (workerNode == NULL && !groupContainsNodes)
|
if (workerNode == NULL && !groupContainsNodes)
|
||||||
{
|
{
|
||||||
ereport(ERROR, (errmsg("the metadata is inconsistent"),
|
ereport(ERROR, (errmsg("there is a shard placement in node group %u but "
|
||||||
errdetail("there is a placement in group %u but "
|
"there are no nodes in that group", groupId)));
|
||||||
"there are no nodes in that group", groupId)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (workerNode == NULL && groupContainsNodes)
|
if (workerNode == NULL && groupContainsNodes)
|
||||||
|
|
|
@ -190,8 +190,7 @@ ERROR: node group 3 does not have a primary node
|
||||||
-- when there is no node at all in the group we should get a different error
|
-- when there is no node at all in the group we should get a different error
|
||||||
DELETE FROM pg_dist_node WHERE nodeport=:worker_2_port;
|
DELETE FROM pg_dist_node WHERE nodeport=:worker_2_port;
|
||||||
SELECT * FROM cluster_management_test;
|
SELECT * FROM cluster_management_test;
|
||||||
ERROR: the metadata is inconsistent
|
ERROR: there is a shard placement in node group 3 but there are no nodes in that group
|
||||||
DETAIL: there is a placement in group 3 but there are no nodes in that group
|
|
||||||
-- clean-up
|
-- clean-up
|
||||||
SELECT groupid as new_group FROM master_add_node('localhost', :worker_2_port) \gset
|
SELECT groupid as new_group FROM master_add_node('localhost', :worker_2_port) \gset
|
||||||
UPDATE pg_dist_placement SET groupid = :new_group WHERE groupid = :worker_2_group;
|
UPDATE pg_dist_placement SET groupid = :new_group WHERE groupid = :worker_2_group;
|
||||||
|
|
Loading…
Reference in New Issue