RockteMQ-AI commented on issue #10494:
URL: https://github.com/apache/rocketmq/issues/10494#issuecomment-4711391263

   **Issue Evaluation**
   
   Category: `type/bug` | Status: **Confirmed**
   
   `HATest.testSemiSyncReplica` is a flaky test due to a race condition between 
the test setup and the HA connection readiness.
   
   **Root Cause:** The test waits for the slave-side HA client to enter 
`TRANSFER` state, but this only confirms the slave has connected locally. The 
master-side `HAConnection` may not have received the slave's initial offset 
report yet, leaving `slaveAckOffset` at `-1`. When the first semi-sync write 
arrives, it times out because the master thinks the slave is behind.
   
   **Impact:** Intermittent CI failures (`FLUSH_SLAVE_TIMEOUT`), particularly 
on slower CI machines. The test is correct in intent but has an insufficient 
readiness condition.
   
   **Severity:** Medium — test reliability issue, not a production bug.
   
   **Proposed fix:** Wait for master-side `slaveAckOffset >= slave's current 
max physical offset` before sending messages. This ensures the readiness 
condition matches what semi-sync replication actually requires.
   
   ---
   *Automated evaluation by RockteMQ-AI*


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to