Merge pull request #1143 from citusdata/remove_hint_from_master_remove_node

Remove hint message from master_remove_node UDF

cr: @jasonmp85
pull/1152/head
Jason Petersen 2017-01-18 22:43:47 -07:00 committed by GitHub
commit 46abe5b692
2 changed files with 1 additions and 4 deletions

View File

@ -411,8 +411,7 @@ RemoveNodeFromCluster(char *nodeName, int32 nodePort, bool forceRemove)
else
{
ereport(ERROR, (errmsg("you cannot remove a node which has active "
"shard placements"),
errhint("Consider using master_disable_node.")));
"shard placements")));
}
}

View File

@ -113,7 +113,6 @@ SELECT shardid, shardstate, nodename, nodeport FROM pg_dist_shard_placement WHER
-- try to remove a node with active placements and see that node removal is failed
SELECT master_remove_node('localhost', :worker_2_port);
ERROR: you cannot remove a node which has active shard placements
HINT: Consider using master_disable_node.
SELECT master_get_active_worker_nodes();
master_get_active_worker_nodes
--------------------------------
@ -148,7 +147,6 @@ SELECT master_add_node('localhost', :worker_2_port);
-- try to remove a node with active placements and see that node removal is failed
SELECT master_remove_node('localhost', :worker_2_port);
ERROR: you cannot remove a node which has active shard placements
HINT: Consider using master_disable_node.
-- mark all placements in the candidate node as inactive
UPDATE pg_dist_shard_placement SET shardstate=3 WHERE nodeport=:worker_2_port;
SELECT shardid, shardstate, nodename, nodeport FROM pg_dist_shard_placement WHERE nodeport=:worker_2_port;