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

   ## Summary
   
   When a scalable-topic segment is sealed (split or merge), the per-segment v4 
producer cached inside `ScalableTopicProducer` can be closed by the v4 layer 
before the V5 client's DAG watch delivers the new layout. A send issued in that 
window currently surfaces as a bare `PulsarClientException` wrapping 
`AlreadyClosedException`, even though the operation should be retryable.
   
   Treat `AlreadyClosedException` the same as `TopicTerminatedException` in 
both the sync and async send paths: drop the stale per-segment producer entry, 
back off briefly so the DAG watch can deliver the new revision, and re-route on 
the next attempt. From the application's perspective, sends issued during a 
layout transition succeed transparently.
   
   `V5ProducerSplitRetryTest` exercises this exactly: produce, split, 
immediately produce again with no explicit wait for layout convergence, drain 
via the consumer — every message arrives.
   
   ## Test plan
   - [x] `./gradlew :pulsar-broker:test --tests 
\"org.apache.pulsar.client.api.v5.V5ProducerSplitRetryTest\"`
   
   ## Matching PR
   - [ ] No matching PR.
   
   ### area/client


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