File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
server/src/test/java/org/elasticsearch/cluster/routing/allocation Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -283,7 +283,7 @@ public void testRerouteIsCalledBeforeMinimumIntervalHasPassedIfNewNodesBecomeHot
283283 Map <String , NodeUsageStatsForThreadPools > nodeUsageStatsWithExtraHotSpot = new HashMap <>();
284284 for (var entry : testState .clusterInfo .getNodeUsageStatsForThreadPools ().entrySet ()) {
285285 if (thresholdIncreased .get () == false
286- && nonSearchNodeBelowQueueLatencyThreshold (
286+ && indexingNodeBelowQueueLatencyThreshold (
287287 testState .clusterState ,
288288 entry .getKey (),
289289 entry .getValue (),
@@ -317,13 +317,15 @@ && nonSearchNodeBelowQueueLatencyThreshold(
317317 verify (testState .mockRerouteService ).reroute (anyString (), eq (Priority .NORMAL ), any ());
318318 }
319319
320- private boolean nonSearchNodeBelowQueueLatencyThreshold (
320+ private boolean indexingNodeBelowQueueLatencyThreshold (
321321 ClusterState clusterState ,
322322 String nodeId ,
323323 NodeUsageStatsForThreadPools nodeUsageStats ,
324324 long latencyThresholdMillis
325325 ) {
326- return clusterState .getNodes ().get (nodeId ).getRoles ().contains (DiscoveryNodeRole .SEARCH_ROLE ) == false
326+ final var nodeRoles = clusterState .getNodes ().get (nodeId ).getRoles ();
327+ return nodeRoles .contains (DiscoveryNodeRole .SEARCH_ROLE ) == false
328+ && nodeRoles .contains (DiscoveryNodeRole .ML_ROLE ) == false
327329 && nodeUsageStats .threadPoolUsageStatsMap ()
328330 .get (ThreadPool .Names .WRITE )
329331 .maxThreadPoolQueueLatencyMillis () < latencyThresholdMillis ;
You can’t perform that action at this time.
0 commit comments