From 8f802e488d31dcdd7bf92583a9ae7f2869f47c25 Mon Sep 17 00:00:00 2001 From: Sait Talha Nisanci Date: Sun, 9 May 2021 21:39:51 +0300 Subject: [PATCH] Improve error message if no target nodes found --- src/backend/distributed/operations/shard_rebalancer.c | 4 ++-- src/test/regress/expected/shard_rebalancer_unit.out | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/distributed/operations/shard_rebalancer.c b/src/backend/distributed/operations/shard_rebalancer.c index 64426d4bd..9559d5b51 100644 --- a/src/backend/distributed/operations/shard_rebalancer.c +++ b/src/backend/distributed/operations/shard_rebalancer.c @@ -1523,8 +1523,8 @@ MoveShardsAwayFromDisallowedNodes(RebalanceState *state) if (targetFillState == NULL) { ereport(WARNING, (errmsg( - "Not allowed to move shard " UINT64_FORMAT - " anywhere from %s:%d", + "There is not any node to move shard " UINT64_FORMAT + " from %s:%d", disallowedPlacement->shardCost->shardId, disallowedPlacement->fillState->node->workerName, disallowedPlacement->fillState->node->workerPort diff --git a/src/test/regress/expected/shard_rebalancer_unit.out b/src/test/regress/expected/shard_rebalancer_unit.out index dcbf29df3..e2d745505 100644 --- a/src/test/regress/expected/shard_rebalancer_unit.out +++ b/src/test/regress/expected/shard_rebalancer_unit.out @@ -108,7 +108,7 @@ SELECT unnest(shard_placement_rebalance_array( '{"shardid":4, "nodename":"hostname2"}' ]::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 --------------------------------------------------------------------- {"updatetype":1,"shardid":2,"sourcename":"hostname1","sourceport":5432,"targetname":"hostname2","targetport":5432}