thetumbled opened a new issue, #19629: URL: https://github.com/apache/pulsar/issues/19629
### Search before asking - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar. ### Version 2.9 ### Minimal reproduce step transactional produce 100 million messages, and restart brokers every 120s for 50 times. ### What did you expect to see? we expect that there is no any message duplication. ### What did you see instead? there exists message duplication. ### Anything else? i find some reasons accounting for this problem. ``` 2023-02-23T15:52:00,379+0800 [pulsar-client-internal-5-1] ERROR org.apache.pulsar.testclient.PerformanceProducer - Commit transaction failed with exception : java.util.concurrent.CompletionException: org.apache.pulsar.client.api.transaction.TransactionCoordinatorClientException$InvalidTxnStatusException: Expect Txn `(7,24726)` to be in COMMITTING status but it is in COMMITTED status ``` when producer commit transaction to broker, the broker throw exceptions though the transaction have been committed successfully. Then the producer receive the exception and thought that it fail to commit the transaction, as a result producer resend the messages in the transaction, which account for the message duplication. <img width="645" alt="image" src="https://user-images.githubusercontent.com/52550727/221130309-d34ed94f-173b-459a-a3f5-194bd74441cb.png"> <img width="640" alt="image" src="https://user-images.githubusercontent.com/52550727/221130477-2e0c7abd-ec70-4771-98cd-e4e66a9532f8.png"> <img width="915" alt="image" src="https://user-images.githubusercontent.com/52550727/221130554-521a3586-0d49-49b1-af1f-2c0bee721fb6.png"> ### Are you willing to submit a PR? - [X] I'm willing to submit a PR! -- 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]
