apache / apache/pulsar

[Bug] when open batchIndexAckEnabled and acknowledgmentAtBatchIndexLevelEnabled ack wrong

Open
#23,840 1 comment 0 reactions 0 assignees View on GitHub
type/bug
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?

![screenshot_2025-01-10_21-00-20](https://github.com/user-attachments/assets/d9b2475a-fc85-47f2-b86d-4b9e657ea965)
![screenshot_2025-01-10_21-02-09](https://github.com/user-attachments/assets/3083b30e-a4fb-41a4-b055-031a9b84338d)
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.