feat: separate worker disabled state from worker version#19448
Conversation
313e2b8 to
dfb03f5
Compare
dfb03f5 to
b8655f2
Compare
FrankChen021
left a comment
There was a problem hiding this comment.
I have reviewed the code for correctness, edge cases, concurrency, and integration risks; no issues found.
Reviewed 10 of 10 changed files.
This is an automated review by Codex GPT-5.5
abhishekrb19
left a comment
There was a problem hiding this comment.
Lgtm, left some minor comments.
b8655f2 to
0a105a7
Compare
FrankChen021
left a comment
There was a problem hiding this comment.
| Severity | Findings |
|---|---|
| P0 | 0 |
| P1 | 0 |
| P2 | 1 |
| P3 | 0 |
| Total | 1 |
Reviewed 10 of 10 changed files.
This is an automated review by Codex GPT-5.5
| if (w.isDisabled() == disabled) { | ||
| return w; | ||
| } | ||
| return new Worker(w.getScheme(), w.getHost(), w.getIp(), w.getCapacity(), w.getVersion(), w.getCategory(), disabled); |
There was a problem hiding this 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.
Description
Currently, to disable a worker (MM/Indexer), you need to set the version as
"". This is not ideal, as it's difficult to see a) what version a disabled worker is and b) write any logic to perform scaling around multi-version worker deployments (for example during a rolling upgrade).This ensures the disabled state is tracked separately from the worker version. The change is backwards compatible (to not break existing deployments) and can then be migrated to simply relying on the
disabledflag in a subsequent release.Release note
Track the worker enabled state separately from the worker version.
This PR has: