You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "1782935682 (via GitHub)" <gi...@apache.org> on 2026/01/16 08:27:09 UTC

[PR] [ISSUE #10013] Prevent AsyncLearner from being elected as Master during initialization [rocketmq]

1782935682 opened a new pull request, #10014:
URL: https://github.com/apache/rocketmq/pull/10014

   <!-- Please make sure the target branch is right. In most case, the target branch should be `develop`. -->
   
   ### Which Issue(s) This PR Fixes
   
   <!-- Please ensure that the related issue has already been created, and [link this pull request to that issue using keywords](<https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword>) to ensure automatic closure. -->
   
   Fixes #10013 
   
   ### Brief Description
   
   AsyncLearner nodes are designed as read-only backups and should never assume the Master role. Currently, if an AsyncLearner starts and registers before other nodes, it triggers the election process and becomes Master. 
   
   ###Modifications
    In the brokerElect() method:
   1. Check if the broker is an AsyncLearner.
   2. If true, skip the active election request.
   3. Instead, proactively fetch replica info from the Controller.
   4. Only transition to SLAVE status when a valid Master is found; otherwise, wait/retry.


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE #10013] Prevent AsyncLearner from being elected as Master during initialization [rocketmq]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #10014:
URL: https://github.com/apache/rocketmq/pull/10014#issuecomment-3758847873

   ## [Codecov](https://app.codecov.io/gh/apache/rocketmq/pull/10014?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `5.88235%` with `16 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 48.79%. Comparing base ([`b5da00a`](https://app.codecov.io/gh/apache/rocketmq/commit/b5da00ad0ff542c55fff93cd8501c69a42647db6?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`86e8418`](https://app.codecov.io/gh/apache/rocketmq/commit/86e841854ae737dd95ec25ed1097c2961a0ebc3a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 15 commits behind head on develop.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/rocketmq/pull/10014?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...he/rocketmq/broker/controller/ReplicasManager.java](https://app.codecov.io/gh/apache/rocketmq/pull/10014?src=pr&el=tree&filepath=broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fbroker%2Fcontroller%2FReplicasManager.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvY29udHJvbGxlci9SZXBsaWNhc01hbmFnZXIuamF2YQ==) | 5.88% | [15 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/10014?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@              Coverage Diff              @@
   ##             develop   #10014      +/-   ##
   =============================================
   - Coverage      48.81%   48.79%   -0.02%     
   - Complexity     12763    12779      +16     
   =============================================
     Files           1324     1327       +3     
     Lines          96407    96554     +147     
     Branches       12435    12458      +23     
   =============================================
   + Hits           47064    47118      +54     
   - Misses         43600    43667      +67     
   - Partials        5743     5769      +26     
   ```
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/rocketmq/pull/10014?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   </details>


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org