shellfish007 opened a new pull request, #3765: URL: https://github.com/apache/celeborn/pull/3765
### What changes were proposed in this pull request? Adds a new worker metric, `ReserveSlotsFailCount`, and increments it on every non-success path of `Controller.handleReserveSlots`. ### Why are the changes needed? `handleReserveSlots` already replies with distinct non-success status codes: - `WORKER_SHUTDOWN` — worker is shutting down - `NO_AVAILABLE_WORKING_DIR` — no healthy local dirs and no remote storage - `RESERVE_SLOTS_FAILED` — not all primary partitions could be satisfied - `RESERVE_SLOTS_FAILED` — not all replica partitions could be satisfied ...but none of these paths incremented a counter. Slot reservation was the only major worker operation without a `*FailCount` metric (push, replicate, fetch, commit, register all have one), so failed reservations were invisible to metrics/dashboards and only visible via logs. `WorkerSource.scala` declares `RESERVE_SLOTS_FAIL_COUNT = "ReserveSlotsFailCount"` and registers it with `addCounter(...)`, alongside `SlotsAllocated`. `Controller.scala` calls `workerSource.incCounter(WorkerSource.RESERVE_SLOTS_FAIL_COUNT)` before each of the four non-success `context.reply(...)` sites in `handleReserveSlots`. One fail counter per failed reservation regardless of cause, matching the existing `*FailCount` convention (e.g. `CommitFilesFailCount`, `RegisterWithMasterFailCount`). This gives a single "reserve slots did not succeed" rate; the specific cause remains distinguishable via the status code in logs. ### Does this PR introduce _any_ user-facing change? Yes — adds a new worker metric `ReserveSlotsFailCount`. No config or API changes. ### How was this patch tested? Follows the established counter pattern exactly (constant + `addCounter` registration + `incCounter` at the failure path), with no new imports or signatures. -- 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]
