File tree Expand file tree Collapse file tree
server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -205,19 +205,19 @@ private Decision withDeciders(
205205 BiFunction <String , Decision , String > logMessageCreator
206206 ) {
207207 if (debugMode == RoutingAllocation .DebugMode .OFF ) {
208- Decision worstDecision = Decision .YES ;
208+ Decision mostNegativeDecision = Decision .YES ;
209209 for (AllocationDecider decider : deciders ) {
210- var newDecision = deciderAction .apply (decider );
211- if (newDecision .type ().isWorseForTheSameNode (worstDecision .type ())) {
212- worstDecision = newDecision ;
213- if (worstDecision .type () == Decision .Type .NO ) {
214- traceNoDecisions (decider , newDecision , logMessageCreator );
210+ var decision = deciderAction .apply (decider );
211+ if (decision .type ().isWorseForTheSameNode (mostNegativeDecision .type ())) {
212+ mostNegativeDecision = decision ;
213+ if (mostNegativeDecision .type () == Decision .Type .NO ) {
214+ traceNoDecisions (decider , decision , logMessageCreator );
215215 break ;
216216 }
217217 }
218218 }
219219
220- return worstDecision ;
220+ return mostNegativeDecision ;
221221 } else {
222222 final var multiDecision = new Decision .Multi ();
223223 for (AllocationDecider decider : deciders ) {
You can’t perform that action at this time.
0 commit comments