Improve error message if no target nodes found

improveErrorMessage
Sait Talha Nisanci 2021-05-09 21:39:51 +03:00
parent 8cb505d6e1
commit 8f802e488d
2 changed files with 3 additions and 3 deletions

View File

@ -1523,8 +1523,8 @@ MoveShardsAwayFromDisallowedNodes(RebalanceState *state)
if (targetFillState == NULL) if (targetFillState == NULL)
{ {
ereport(WARNING, (errmsg( ereport(WARNING, (errmsg(
"Not allowed to move shard " UINT64_FORMAT "There is not any node to move shard " UINT64_FORMAT
" anywhere from %s:%d", " from %s:%d",
disallowedPlacement->shardCost->shardId, disallowedPlacement->shardCost->shardId,
disallowedPlacement->fillState->node->workerName, disallowedPlacement->fillState->node->workerName,
disallowedPlacement->fillState->node->workerPort disallowedPlacement->fillState->node->workerPort

View File

@ -108,7 +108,7 @@ SELECT unnest(shard_placement_rebalance_array(
'{"shardid":4, "nodename":"hostname2"}' '{"shardid":4, "nodename":"hostname2"}'
]::json[] ]::json[]
)); ));
WARNING: Not allowed to move shard xxxxx anywhere from hostname2:5432 WARNING: There is not any node to move shard xxxxx from hostname2:5432
unnest unnest
--------------------------------------------------------------------- ---------------------------------------------------------------------
{"updatetype":1,"shardid":2,"sourcename":"hostname1","sourceport":5432,"targetname":"hostname2","targetport":5432} {"updatetype":1,"shardid":2,"sourcename":"hostname1","sourceport":5432,"targetname":"hostname2","targetport":5432}