[Bug] when open batchIndexAckEnabled and acknowledgmentAtBatchIndexLevelEnabled ack wrong
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
### Search before asking
- [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 don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.
### Version
4.0.1
### Minimal reproduce step
1. set batchIndexAckEnabled=true in client
2. set acknowledgmentAtBatchIndexLevelEnabled=true in server
3. set a counter, ack count % 2 == 1, nack other;
4. send message
5. after consuming a few more, force it to stop
6. reconsuming
### What did you expect to see?
Denied and unconsumed items can be consumed again. Confirmed, no need to consume again
### What did you see instead?


the keyword 'a33' 'a35' 'a37' 'a39' 'a41' 'a44' 'a46' 'a48' is missing
### Anything else?
_No response_
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
Contributor guide
Research direction
Start by reproducing the issue with client batchIndexAckEnabled=true and server acknowledgmentAtBatchIndexLevelEnabled=true, following the odd/even acknowledge and nack sequence. Check whether denied and unconsumed items are redelivered after stopping and consuming again; the missing a33, a35, a37, a39, a41, a44, a46 and a48 messages are the reported failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100