merlimat opened a new pull request, #25364:
URL: https://github.com/apache/pulsar/pull/25364

   ## Flaky test failure
   
   ```
   ResendRequestTest.testFailoverSingleAckedNormalTopic:302 expected [0] but 
found [10]
   ```
   
   ## Summary
   
   Follow-up to #25343. The previous fix waited for consumer-1 to become active 
before creating consumer-2, but the failover dispatcher re-evaluates active 
consumer assignment when consumer-2 subscribes 
(`pickAndScheduleActiveConsumer`), which can flip the active consumer.
   
   Instead of assuming consumer-1 is always active, dynamically identify which 
consumer is active after both are subscribed by querying the dispatcher's 
`getActiveConsumer()`. Assign the active consumer to the `consumer1` variable 
(used for receiving, acking, redelivery, close) and the standby to `consumer2` 
(expected to receive 0 messages until consumer1 closes).
   
   Verified **100/100 passes** with `invocationCount=100`.
   
   ## Documentation
   
   - [x] `doc-not-needed`
   (Your PR doesn't need any doc update)
   
   ## Matching PR in forked repository
   
   _No response_
   
   ### Tip
   
   Add the labels `ready-to-test` and `area/test` to trigger the CI.


-- 
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