From 0103089889f95c44eb63ea55b359df8caeb01879 Mon Sep 17 00:00:00 2001 From: Kiran Prakash Date: Thu, 29 Aug 2024 17:13:01 +0530 Subject: [PATCH] Update DefaultTaskCancellation.java Signed-off-by: Kiran Prakash --- .../org/opensearch/wlm/cancellation/DefaultTaskCancellation.java | 1 + 1 file changed, 1 insertion(+) diff --git a/server/src/main/java/org/opensearch/wlm/cancellation/DefaultTaskCancellation.java b/server/src/main/java/org/opensearch/wlm/cancellation/DefaultTaskCancellation.java index e74849c084f48..ada0aefda6a18 100644 --- a/server/src/main/java/org/opensearch/wlm/cancellation/DefaultTaskCancellation.java +++ b/server/src/main/java/org/opensearch/wlm/cancellation/DefaultTaskCancellation.java @@ -219,6 +219,7 @@ private Long getResourceUsage(QueryGroup queryGroup, ResourceType resourceType) return queryGroupLevelResourceUsageViews.get(queryGroup.get_id()).getResourceUsageData().get(resourceType); } + private boolean isBreachingThreshold(ResourceType resourceType, Double resourceThresholdInPercentage, long resourceUsage) { if (resourceType == ResourceType.MEMORY) { // Check if resource usage is breaching the threshold