uds5501 commented on code in PR #18510:
URL: https://github.com/apache/druid/pull/18510#discussion_r2357581692
##########
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(
+ TaskAnnouncement.create(
+ workItem.getTaskId(),
+ workItem.getTaskType(),
+ null,
Review Comment:
Ah fair, that makes sense, after this the task runner will be able to figure
out that the task is in FAILED state and not keep it perpetually I assume? + It
makes it more consistent regarding how we are dealing with task discoveries
--
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]