mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-24 17:09:48 +00:00
doc
This commit is contained in:
parent
9d615a4f0b
commit
3ebd03f69a
@ -41,6 +41,8 @@ public class RebalanceOnlyWhenActiveNodeAllocation extends NodeAllocation {
|
||||
|
||||
@Override public boolean canRebalance(ShardRouting shardRouting, RoutingNodes routingNodes, DiscoveryNodes nodes) {
|
||||
List<MutableShardRouting> shards = routingNodes.shardsRoutingFor(shardRouting);
|
||||
// its ok to check for active here, since in relocation, a shard is split into two in routing
|
||||
// nodes, once relocating, and one initializing
|
||||
for (ShardRouting allShard : shards) {
|
||||
if (!allShard.active()) {
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user