diff --git a/server/src/main/java/org/opensearch/search/backpressure/SearchBackpressureService.java b/server/src/main/java/org/opensearch/search/backpressure/SearchBackpressureService.java index 12152cb1b5e43..3e8ed3070e4ef 100644 --- a/server/src/main/java/org/opensearch/search/backpressure/SearchBackpressureService.java +++ b/server/src/main/java/org/opensearch/search/backpressure/SearchBackpressureService.java @@ -256,9 +256,9 @@ void doRun() { /** * Had to define this method to help mock this static method to test the scenario where SearchTraffic should not be * penalised when not breaching the threshold - * @param searchTasks - * @param threshold - * @return + * @param searchTasks inFlight co-ordinator requests + * @param threshold miniumum jvm allocated bytes ratio w.r.t. available heap + * @return a boolean value based on whether the threshold is breached */ boolean isHeapUsageDominatedBySearch(List searchTasks, double threshold) { return HeapUsageTracker.isHeapUsageDominatedBySearch(searchTasks, threshold); @@ -299,8 +299,8 @@ private List addResourceTrackerBasedCancellations( /** * Method to reduce the taskCancellations into unique bunch - * @param taskCancellations - * @return + * @param taskCancellations all task cancellations + * @return unique task cancellations */ private List mergeTaskCancellations(final List taskCancellations) { final Map uniqueTaskCancellations = new HashMap<>(); diff --git a/server/src/main/java/org/opensearch/search/backpressure/trackers/TaskResourceUsageTrackers.java b/server/src/main/java/org/opensearch/search/backpressure/trackers/TaskResourceUsageTrackers.java index 3a370a319cee5..3b0072288681c 100644 --- a/server/src/main/java/org/opensearch/search/backpressure/trackers/TaskResourceUsageTrackers.java +++ b/server/src/main/java/org/opensearch/search/backpressure/trackers/TaskResourceUsageTrackers.java @@ -111,7 +111,7 @@ public Optional checkAndMaybeGetCancellationReason(Task /** * Method to get taskCancellations due to this tracker for the given {@link CancellableTask} tasks * @param tasks cancellation eligible tasks due to node duress and search traffic threshold breach - * @return + * @return the list of tasks which are breaching task level thresholds for this {@link TaskResourceUsageTracker} */ public List getTaskCancellations(List tasks) { return tasks.stream()