mirror of https://github.com/citusdata/citus.git
Use shard transfer UDFs with node ids for rebalancing
parent
e5fef40c06
commit
9b9d8e7abd
|
@ -2026,23 +2026,19 @@ UpdateShardPlacement(PlacementUpdateEvent *placementUpdateEvent,
|
|||
if (updateType == PLACEMENT_UPDATE_MOVE)
|
||||
{
|
||||
appendStringInfo(placementUpdateCommand,
|
||||
"SELECT citus_move_shard_placement(%ld,%s,%u,%s,%u,%s)",
|
||||
"SELECT citus_move_shard_placement(%ld,%u,%u,%s)",
|
||||
shardId,
|
||||
quote_literal_cstr(sourceNode->workerName),
|
||||
sourceNode->workerPort,
|
||||
quote_literal_cstr(targetNode->workerName),
|
||||
targetNode->workerPort,
|
||||
sourceNode->nodeId,
|
||||
targetNode->nodeId,
|
||||
quote_literal_cstr(shardTranferModeLabel));
|
||||
}
|
||||
else if (updateType == PLACEMENT_UPDATE_COPY)
|
||||
{
|
||||
appendStringInfo(placementUpdateCommand,
|
||||
"SELECT citus_copy_shard_placement(%ld,%s,%u,%s,%u,%s)",
|
||||
"SELECT citus_copy_shard_placement(%ld,%u,%u,%s)",
|
||||
shardId,
|
||||
quote_literal_cstr(sourceNode->workerName),
|
||||
sourceNode->workerPort,
|
||||
quote_literal_cstr(targetNode->workerName),
|
||||
targetNode->workerPort,
|
||||
sourceNode->nodeId,
|
||||
targetNode->nodeId,
|
||||
quote_literal_cstr(shardTranferModeLabel));
|
||||
}
|
||||
else
|
||||
|
|
|
@ -221,7 +221,7 @@ NOTICE: issuing SET LOCAL citus.shard_count TO '4';
|
|||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing SET LOCAL citus.shard_replication_factor TO '2';
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing SELECT citus_copy_shard_placement(433101,'localhost',57637,'localhost',57638,'block_writes')
|
||||
NOTICE: issuing SELECT citus_copy_shard_placement(433101,16,18,'block_writes')
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing COMMIT
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
|
@ -244,7 +244,7 @@ NOTICE: issuing SET LOCAL citus.shard_count TO '4';
|
|||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing SET LOCAL citus.shard_replication_factor TO '2';
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing SELECT citus_copy_shard_placement(433102,'localhost',57638,'localhost',57637,'block_writes')
|
||||
NOTICE: issuing SELECT citus_copy_shard_placement(433102,18,16,'block_writes')
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing COMMIT
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
|
@ -267,7 +267,7 @@ NOTICE: issuing SET LOCAL citus.shard_count TO '4';
|
|||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing SET LOCAL citus.shard_replication_factor TO '2';
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing SELECT citus_copy_shard_placement(433103,'localhost',57637,'localhost',57638,'block_writes')
|
||||
NOTICE: issuing SELECT citus_copy_shard_placement(433103,16,18,'block_writes')
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing COMMIT
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
|
@ -290,7 +290,7 @@ NOTICE: issuing SET LOCAL citus.shard_count TO '4';
|
|||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing SET LOCAL citus.shard_replication_factor TO '2';
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing SELECT citus_copy_shard_placement(433104,'localhost',57638,'localhost',57637,'block_writes')
|
||||
NOTICE: issuing SELECT citus_copy_shard_placement(433104,18,16,'block_writes')
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing COMMIT
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
|
|
Loading…
Reference in New Issue