Skip to content

[ISSUE #11334] fix(docs): identify the DLedger leader via clusterList before failover - #11351

Open
chennaji9 wants to merge 1 commit into
apache:developfrom
chennaji9:cnj/docs-dledger-failover
Open

chennaji9 wants to merge 1 commit into
apache:developfrom
chennaji9:cnj/docs-dledger-failover

Conversation

@chennaji9

@chennaji9 chennaji9 commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Which Issue(s) This PR Fixes

Fixes #11334

Brief Description

The DLedger quick-start failover section (en + cn) instructed users to "kill the process bound to port 30931" as if that node were the Leader. The Leader is elected by DLedger at runtime and is not fixed — following the instruction can kill a follower, and the promised leadership switch then never happens.

The instruction now builds on the page's own earlier step: first confirm the current Leader with mqadmin clusterList (BID 0 = Master, as the page itself explains), then kill that node's process, with the three configured listenPorts (30911 / 30921 / 30931 for broker-n0/n1/n2 in conf/dledger/) listed so the clusterList row can be mapped to a process, then re-check with clusterList.

How Did You Test This Change?

Documentation-only change, verified statically at the PR base commit: distribution/conf/dledger/broker-n{0,1,2}.conf listenPorts are 30911/30921/30931; "BID 为 0 的表示 Master" is the same page's existing explanation two paragraphs above; no other quick-start text depends on the hardcoded 30931-Leader assumption (grep 309 in both pages).

…erList before failover

The failover walkthrough hardcoded port 30931 as the Leader, but the
leader is elected at runtime and is not fixed; instruct users to find
the master (BID 0) with clusterList first, and list the configured
listenPorts (30911/30921/30931) to map it to a process.
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.71%. Comparing base (9ea2ccd) to head (f7fe337).

Additional details and impacted files
@@              Coverage Diff              @@
##             develop   #11351      +/-   ##
=============================================
- Coverage      49.73%   49.71%   -0.03%     
+ Complexity     14348    14344       -4     
=============================================
  Files           1390     1390              
  Lines         103246   103246              
  Branches       13502    13502              
=============================================
- Hits           51354    51328      -26     
- Misses         45696    45718      +22     
- Partials        6196     6200       +4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@RockteMQ-AI RockteMQ-AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review by github-manager-bot

Summary

Fixes the DLedger quick-start failover section (both EN and CN) to correctly instruct users to identify the current Leader via clusterList before killing it, instead of hardcoding port 30931 as the Leader.

Findings

  • [Info] docs/en/dledger/quick_start.md:60 — The fix is correct: DLedger leader is elected at runtime and is not bound to a specific port. The original instruction could mislead users into killing a follower.
  • [Info] docs/cn/dledger/quick_start.md:61 — CN version is consistent with the EN change. Good.
  • [Info] Listing all three listenPort values (30911/30921/30931) so users can map clusterList output to a process is a nice touch.

Suggestions

  • Minor: consider adding a short note that BID 0 means Master in the default single-cluster setup, since multi-group deployments may have multiple BID 0 entries. Not blocking.

LGTM — documentation-only change, both languages consistent, fix is accurate.


Automated review by github-manager-bot

@chennaji9
chennaji9 force-pushed the cnj/docs-dledger-failover branch from f7fe337 to 0e6d396 Compare October 18, 2026 08:12
@chennaji9

Copy link
Copy Markdown
Contributor Author

Hi @RongtongJin, sorry for the ping — this PR has been open for a while without a review yet. The change is small and focused (identify the DLedger leader via clusterList before failover), and all tests and CI pass on my side. Would you mind taking a look when you get a chance? If it looks good, merging it would be much appreciated — happy to adjust anything if needed. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] DLedger quick-start failover hardcodes port 30931 as the Leader, but the Leader is elected dynamically

3 participants