apache / apache/pulsar-client-cpp

[Bug] [ARM] Partially acknowledged batches are not redelivered

オープン
#424 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C++
スター
71
フォーク
90
平均マージ
2時間 33分
マージ済み PR(30日)
3

説明

### Search before asking

- [X] I searched in the [issues](https://github.com/apache/pulsar-client-cpp/issues) and found nothing similar.

### Version

Debian GNU/Linux 10 (buster), aarch64 (but the executable is arm32), pulsar-client-cpp 3.3.0

### Minimal reproduce step

1. Send a batch of events to the Pulsar broker (in our reproduction, it is a batch size of 309).
2. Receive these messages (we're using `pulsar::Consumer::receive` in a loop), while continuously acknowledging them asynchronously (acknowledgements are done using `pulsar::Consumer::acknowledge(const MessageId &messageId)`, where `messageId` is `pulsar::Message::getMessageId`).
3. Terminate the program during the middle of receiving a batch (we're terminating after having received and acknowledged the 190/309 events from a batch).
4. Resume the program.

### What did you expect to see?

All of the events in the batch re-sent.

### What did you see instead?

None of the events in the batch, _including the ones never received_ are re-sent.

### Anything else?

- We log the result of the acknowledgement in the callback method, which shows us that the most we've acknowledged is the `190th` message in a batch.
- Exclusive subscription.
- Running it on Gravitron2/3 processors.
- We've used the same broker and test with an x86_64 Pulsar 3.3.0 Pulsar client, and we've had no issues (RHEL8).
- We can actively see missing messages - we are just sending consecutive numbers and logging them. We're missing exactly 119, the amount remaining in the batch that we've not fully acknowledged.
- We've tried not immediately terminating - i.e. we stop receiving messages but continue to process any callbacks, to validate that we're just not seeing 119 callbacks missing, and nothing.

### Are you willing to submit a PR?

- [ ] I'm willing to submit a PR!

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず Message::getMessageId を使用する Consumer::receive ループと非同期の Consumer::acknowledge パスから始め、説明されている ARM 構成で 309 イベントのバッチ中断を再現します。バッチの一部だけを acknowledge して再起動した後、受信されていない残りを含むバッチ内のすべてのイベントが再配信されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cpp
領域
distributed-systems
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。