kfaraz commented on code in PR #18510:
URL: https://github.com/apache/druid/pull/18510#discussion_r2366690020
##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/hrtr/HttpRemoteTaskRunner.java:
##########
@@ -611,17 +612,18 @@ void addWorker(final Worker worker)
// tasks that we think are running on this worker. Provide that
information to WorkerHolder that
// manages the task syncing with that worker.
for (Map.Entry<String, HttpRemoteTaskRunnerWorkItem> e :
tasks.entrySet()) {
- if (e.getValue().getState() ==
HttpRemoteTaskRunnerWorkItem.State.RUNNING) {
- Worker w = e.getValue().getWorker();
- if (w != null && w.getHost().equals(worker.getHost()) &&
e.getValue().getTask() != null) {
- expectedAnnouncements.add(
- TaskAnnouncement.create(
- e.getValue().getTask(),
- TaskStatus.running(e.getKey()),
- e.getValue().getLocation()
- )
- );
- }
+ HttpRemoteTaskRunnerWorkItem workItem = e.getValue();
+ if (workItem.isRunningOnWorker(worker)) {
+ expectedAnnouncements.add(
Review Comment:
```suggestion
// This announcement is only used to notify when a task has
disappeared on the worker
// So it is okay to set the dataSource and taskResource to
null as they will not be used
expectedAnnouncements.add(
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]