Skip to content

Commit 008b3b9

Browse files
Removing task Id from map using remove() (opensearch-project#15918) (opensearch-project#15920)
(cherry picked from commit 4223fab) Signed-off-by: Sagar Upadhyaya <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent b7bec8c commit 008b3b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/main/java/org/opensearch/tasks/TaskCancellationMonitoringService.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public void onTaskCompleted(Task task) {
125125
if (!TASKS_TO_TRACK.contains(task.getClass())) {
126126
return;
127127
}
128-
this.cancelledTaskTracker.entrySet().removeIf(entry -> entry.getKey() == task.getId());
128+
this.cancelledTaskTracker.remove(task.getId());
129129
}
130130

131131
/**

0 commit comments

Comments
 (0)