Skip to content

Commit 4223fab

Browse files
authored
Removing task Id from map using remove() (#15918)
Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com>
1 parent 330b249 commit 4223fab

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

Lines changed: 1 addition & 1 deletion
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)