Report backup worker roles in status json#13237
Conversation
Result of foundationdb-pr-clang-ide on Linux RHEL 9
|
tclinkenbeard-oai
left a comment
There was a problem hiding this comment.
Generated by Codex.
What is it trying to do?
This PR adds backup workers to status json role reporting. Today, Status.cpp already records several cluster roles plus log routers from both current and old log-system configurations, but it omits backupWorkers. The patch fills that gap by adding "backup" roles in both places.
Is it correct?
Yes, this looks correct.
The change is narrowly scoped to status-json assembly and mirrors the existing log-router handling:
- it walks
backupWorkersin the currenttLogsconfiguration, - does the same for old tLog configurations,
- only emits present interfaces,
- and reuses the generic
RolesInfo::addRole(...)path already used for comparable role entries.
I also checked that this does not touch serialization, wire formats, actor control flow, or runtime recruitment behavior; it only changes emitted status metadata.
GitHub currently exposes no check runs for the PR head commit, so there is no visible CI result to weigh here. I did not run build or test validation.
Are there bugs?
I did not find any correctness bugs.
Are there omissions?
A focused regression test or status-json fixture that exercises enabled backup workers and asserts the emitted "backup" role would make this harder to regress. I do not think that omission blocks this small fix.
Are there better ways of doing things?
The current approach is the right shape for this file: it keeps backup-worker reporting aligned with the existing role-discovery logic for routers and old log generations. The only concrete improvement I would suggest is adding the targeted status-json coverage noted above.
Should this CL be LGTMd?
Yes, LGTM.
I inspected the changed status-role construction, the shared RolesInfo::addRole(...) path, and the surrounding backup-worker configuration plumbing. The highest remaining risk is simply the lack of a focused regression test for backup-worker visibility in status json, not a flaw in the implementation itself.
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Result of foundationdb-pr-clang on Linux RHEL 9
|
Result of foundationdb-pr on Linux RHEL 9
|
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
| } | ||
| for (auto& backupWorker : tLogSet.backupWorkers) { | ||
| if (backupWorker.present()) { | ||
| roles.addRole("backup", backupWorker.interf()); |
There was a problem hiding this comment.
Can you please make it backupworker, just to specific and not confused with backup agents
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
Result of foundationdb-pr-clang-ide on Linux RHEL 9
|
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Result of foundationdb-pr-clang on Linux RHEL 9
|
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
Result of foundationdb-pr on Linux RHEL 9
|
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
…kup-worker-status-json
Result of foundationdb-pr-clang-ide on Linux RHEL 9
|
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Result of foundationdb-pr-clang on Linux RHEL 9
|
Result of foundationdb-pr on Linux RHEL 9
|
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
Result of foundationdb-pr-clang-ide on Linux RHEL 9
|
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Result of foundationdb-pr-clang on Linux RHEL 9
|
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
Result of foundationdb-pr on Linux RHEL 9
|
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
…kup-worker-status-json
Result of foundationdb-pr-clang-ide on Linux RHEL 9
|
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Result of foundationdb-pr-clang on Linux RHEL 9
|
Result of foundationdb-pr on Linux RHEL 9
|
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
Previously, this role was missing from
status jsonoutput, inconsistent with other roles. Following a similar pattern as already exists for other roles, this PR fixes this gap