We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b22452d commit 3594adeCopy full SHA for 3594ade
server/src/main/java/org/elasticsearch/cluster/routing/allocation/allocator/BalancedShardsAllocator.java
@@ -377,13 +377,13 @@ private void balance() {
377
logger.trace("skipping rebalance as it is disabled");
378
return;
379
}
380
- if (nodes.size() < 2) { /* skip if we only have one node */
381
- logger.trace("skipping rebalance as single node only");
382
- return;
383
- }
384
385
// Balance each partition
386
for (NodeSorter nodeSorter : nodeSorters) {
+ if (nodeSorter.modelNodes.length < 2) { /* skip if we only have one node */
+ logger.trace("skipping rebalance as the partition has single node only");
+ continue;
+ }
387
balanceByWeights(nodeSorter);
388
389
0 commit comments