mirror of https://github.com/citusdata/citus.git
Address feedback
parent
205f6563fa
commit
e35f4c836d
|
@ -121,7 +121,9 @@ master_remove_node(PG_FUNCTION_ARGS)
|
||||||
EnsureSuperUser();
|
EnsureSuperUser();
|
||||||
|
|
||||||
hasShardPlacements = NodeHasActiveShardPlacements(nodeNameString, nodePort);
|
hasShardPlacements = NodeHasActiveShardPlacements(nodeNameString, nodePort);
|
||||||
if (hasShardPlacements && force)
|
if (hasShardPlacements)
|
||||||
|
{
|
||||||
|
if (force)
|
||||||
{
|
{
|
||||||
ereport(NOTICE, (errmsg("Node %s:%d has active shard placements. Some "
|
ereport(NOTICE, (errmsg("Node %s:%d has active shard placements. Some "
|
||||||
"queries may fail after this operation. Use "
|
"queries may fail after this operation. Use "
|
||||||
|
@ -130,11 +132,12 @@ master_remove_node(PG_FUNCTION_ARGS)
|
||||||
nodeNameString, nodePort, nodeNameString,
|
nodeNameString, nodePort, nodeNameString,
|
||||||
nodePort)));
|
nodePort)));
|
||||||
}
|
}
|
||||||
else if (hasShardPlacements)
|
else
|
||||||
{
|
{
|
||||||
ereport(ERROR, (errmsg("you cannot remove a node which has active "
|
ereport(ERROR, (errmsg("you cannot remove a node which has active "
|
||||||
"shard placements")));
|
"shard placements")));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
workerNode = FindWorkerNode(nodeNameString, nodePort);
|
workerNode = FindWorkerNode(nodeNameString, nodePort);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue