poorbarcode opened a new pull request, #24096: URL: https://github.com/apache/pulsar/pull/24096
### Motivation **Issue**: negative unack-messages - Consumer-1 received messages. - Unload the topic. - The message may be sent to consumer-2, but the consumption of consumer-1 is still in progress now. - Consumer-1 and consumer-2 acknowledge the message concurrently. `unack-messages` may be reduced twice in above scenario, you can reproduce the issue by the new test `testAcknowledgeConcurrently` ### Modifications - Only reduce `unack-messages` who actually deleted messages successfully. - This PR also fixes the issue of the `unack-messages` is not accurate ### Documentation <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. --> - [ ] `doc` <!-- Your PR contains doc changes. --> - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later --> - [x] `doc-not-needed` <!-- Your PR changes do not impact docs --> - [ ] `doc-complete` <!-- Docs have been already added --> ### Matching PR in forked repository PR in forked repository: x -- 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]
