FrankChen021 commented on code in PR #19448:
URL: https://github.com/apache/druid/pull/19448#discussion_r3234372687
##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/hrtr/WorkerHolder.java:
##########
@@ -444,21 +433,29 @@ private void notifyListener(List<TaskAnnouncement>
announcements, boolean isWork
ex,
"Unknown exception while updating task[%s] state from
worker[%s].",
announcement.getTaskId(),
- worker.getHost()
+ enabledWorker.getHost()
);
}
}
syncedAtleastOnce.set(true);
if (isWorkerDisabled != disabled.get()) {
disabled.set(isWorkerDisabled);
- log.info("Worker[%s] disabled set to [%s].", worker.getHost(),
isWorkerDisabled);
+ log.info("Worker[%s] disabled set to [%s].",
enabledWorker.getHost(), isWorkerDisabled);
listener.stateChanged(!isWorkerDisabled, WorkerHolder.this);
}
}
};
}
+ private static Worker workerWithDisabledState(Worker w, boolean disabled)
+ {
+ if (w.isDisabled() == disabled) {
+ return w;
+ }
+ return new Worker(w.getScheme(), w.getHost(), w.getIp(), w.getCapacity(),
w.getVersion(), w.getCategory(), disabled);
Review Comment:
[P2] Update console disabled checks for preserved worker versions
This now builds the disabled HRTR Worker with its real version instead of
the legacy empty string, so `/druid/indexer/v1/workers` can serialize disabled
workers as `{ disabled: true, version: "v1" }`. The web console still checks
`worker.version === ''` in `services-view.tsx` for both the Disabled label and
Enable/Disable action selection, so HRTR-disabled workers will appear enabled
and the UI will offer Disable instead of Enable. Update the console WorkerInfo
type and checks to use `worker.disabled`, with `version === ''` retained as a
legacy fallback.
--
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]