[Bug] Unnecessary calling of "removing consumer.pendindAcks" when cursor being reading more entries
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
### Search before reporting
- [x] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
### Read release policy
- [x] I understand that [unsupported versions](https://pulsar.apache.org/contribute/release-policy/#supported-versions) don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.
### Issue Description
[PIP-379](https://github.com/apache/pulsar/pull/23309) depends on the `consumer.pendingAcks` , and the PR of PIP-379 added a new behaviour that clears consumer.pendingAcks that are smaller than md-position when calling dispatcher.readMoreEntries [here](https://github.com/apache/pulsar/blob/v4.0.6/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java#L365-L368). Which is very strange, it should mean that the consumer.pendingAcks does not work as expected. We’d better find the root cause of the incorrect `consumer.pendingAcks` , and remove the unnecessary mechanism that PIP-379 added.
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
Contributor guide
Assessment
This issue has not been assessed yet.