mirror of https://github.com/citusdata/citus.git
Merge pull request #1115 from citusdata/fix_remove_node
Fix CloseNodeConnections to actually close connectionspull/1112/head
commit
8624ef5ac4
|
@ -333,12 +333,7 @@ CloseNodeConnections(char *nodeName, int nodePort)
|
|||
MultiConnection *connection =
|
||||
dlist_container(MultiConnection, connectionNode, currentNode);
|
||||
|
||||
/* same for transaction state */
|
||||
CloseRemoteTransaction(connection);
|
||||
CloseShardPlacementAssociation(connection);
|
||||
|
||||
/* we leave the per-host entry alive */
|
||||
pfree(connection);
|
||||
CloseConnection(connection);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -121,6 +121,8 @@ SELECT master_get_active_worker_nodes();
|
|||
(localhost,57637)
|
||||
(2 rows)
|
||||
|
||||
-- insert a row so that master_disable_node() exercises closing connections
|
||||
INSERT INTO test_reference_table VALUES (1, '1');
|
||||
-- try to disable a node with active placements see that node is removed
|
||||
-- observe that a notification is displayed
|
||||
SELECT master_disable_node('localhost', :worker_2_port);
|
||||
|
|
|
@ -45,6 +45,9 @@ SELECT shardid, shardstate, nodename, nodeport FROM pg_dist_shard_placement WHER
|
|||
SELECT master_remove_node('localhost', :worker_2_port);
|
||||
SELECT master_get_active_worker_nodes();
|
||||
|
||||
-- insert a row so that master_disable_node() exercises closing connections
|
||||
INSERT INTO test_reference_table VALUES (1, '1');
|
||||
|
||||
-- try to disable a node with active placements see that node is removed
|
||||
-- observe that a notification is displayed
|
||||
SELECT master_disable_node('localhost', :worker_2_port);
|
||||
|
|
Loading…
Reference in New Issue