diff --git a/x-pack/plugin/autoscaling/src/main/java/org/elasticsearch/xpack/autoscaling/storage/ReactiveStorageDeciderService.java b/x-pack/plugin/autoscaling/src/main/java/org/elasticsearch/xpack/autoscaling/storage/ReactiveStorageDeciderService.java index 1f866fcef3099..c9bb84f1f516f 100644 --- a/x-pack/plugin/autoscaling/src/main/java/org/elasticsearch/xpack/autoscaling/storage/ReactiveStorageDeciderService.java +++ b/x-pack/plugin/autoscaling/src/main/java/org/elasticsearch/xpack/autoscaling/storage/ReactiveStorageDeciderService.java @@ -224,10 +224,9 @@ public static class AllocationState { } public long storagePreventsAllocation() { - RoutingNodes routingNodes = new RoutingNodes(state, false); RoutingAllocation allocation = new RoutingAllocation( allocationDeciders, - routingNodes, + state.getRoutingNodes(), state, info, shardSizeInfo, @@ -241,10 +240,9 @@ public long storagePreventsAllocation() { } public long storagePreventsRemainOrMove() { - RoutingNodes routingNodes = new RoutingNodes(state, false); RoutingAllocation allocation = new RoutingAllocation( allocationDeciders, - routingNodes, + state.getRoutingNodes(), state, info, shardSizeInfo,