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

[PR] [codex] Fix flaky HATest semi-sync replication [rocketmq]

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

   ## Summary
   - Wait for the master-side HA connection to observe the slave's initial ack offset before running `HATest` semi-sync message writes.
   - Add a condition-based readiness helper that checks the slave client is in `TRANSFER` and the master connection ack offset covers the slave max physical offset.
   
   ## Root Cause
   `HATest` previously waited only for the slave-side HA client to enter `TRANSFER`. That state can be reached before the master-side `HAConnection` receives the slave's initial offset report, leaving `slaveAckOffset` at `-1`. The first semi-sync write can race that initial report and return `FLUSH_SLAVE_TIMEOUT` instead of `PUT_OK` on slower CI machines.
   
   ## Impact
   This stabilizes `HATest.testSemiSyncReplica` without changing production HA behavior.
   
   Fixes #10494
   
   ## Validation
   ```bash
   /tmp/codex-maven/apache-maven-3.9.9/bin/mvn -pl store -am -Dtest=HATest#testSemiSyncReplica -DskipITs -DfailIfNoTests=false test
   /tmp/codex-maven/apache-maven-3.9.9/bin/mvn -pl store -am -Dtest=HATest -DskipITs -DfailIfNoTests=false test
   ```
   
   Full `HATest` result: `Tests run: 4, Failures: 0, Errors: 0, Skipped: 1`.
   


-- 
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 #10494] Fix flaky HATest.testSemiSyncReplica [rocketmq]

Posted by "yx9o (via GitHub)" <gi...@apache.org>.
yx9o merged PR #10495:
URL: https://github.com/apache/rocketmq/pull/10495


-- 
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 #10494] Fix flaky HATest.testSemiSyncReplica [rocketmq]

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

   ## [Codecov](https://app.codecov.io/gh/apache/rocketmq/pull/10495?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 48.05%. Comparing base ([`86d1df4`](https://app.codecov.io/gh/apache/rocketmq/commit/86d1df4917b84e7a7102c5981079f17e26633d93?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`3b41597`](https://app.codecov.io/gh/apache/rocketmq/commit/3b41597e2f0f8a9d75ffc8eca7da537a7afe5a93?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 11 commits behind head on develop.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@              Coverage Diff              @@
   ##             develop   #10495      +/-   ##
   =============================================
   - Coverage      48.08%   48.05%   -0.03%     
   - Complexity     13326    13332       +6     
   =============================================
     Files           1377     1377              
     Lines         100644   100707      +63     
     Branches       12995    13010      +15     
   =============================================
   + Hits           48393    48394       +1     
   - Misses         46329    46368      +39     
   - Partials        5922     5945      +23     
   ```
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/rocketmq/pull/10495?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