DocDB: Add the lag column to list_all_masters yb-admin output#30349
DocDB: Add the lag column to list_all_masters yb-admin output#30349keisku wants to merge 1 commit intoyugabyte:masterfrom
list_all_masters yb-admin output#30349Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on February 25
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| << "Leader should show 0ms lag: " << line; | ||
| } else if (line.find("FOLLOWER") != std::string::npos) { | ||
| ASSERT_NE(line.find("ms"), std::string::npos) | ||
| << "Follower should show lag in ms: " << line; |
There was a problem hiding this comment.
Test assumes followers always have lag data
Medium Severity
The test requires all follower lines to contain ms, but the implementation outputs N/A for followers when has_lag_data is true but their UUID isn't found in the heartbeat map (line 1509 of yb-admin_client.cc). A follower missing from the heartbeat response would fail this assertion despite being valid output from the implementation.


Closes #28675
There is a big number on in the Heartbeat Lag clumn (this PR added) since yb-master on the node3 stopped.
Note
Low Risk
Change is limited to CLI output formatting and best-effort RPC data retrieval; primary risk is minor output/compatibility impact for scripts parsing
list_all_masters.Overview
Adds a Heartbeat Lag column to
yb-admin list_all_mastersoutput by best-effort querying the leader viaGetMasterHeartbeatDelays, showing0msfor the leader, per-follower lag in ms when available, andN/Aotherwise.Updates multi-master integration tests to accommodate the new non-deterministic lag values by normalizing
\d+msbefore comparing outputs, and adds a new test asserting the column/header and basic lag formatting are present.Written by Cursor Bugbot for commit 3234178. This will update automatically on new commits. Configure here.