Fix broken main branch by providing correct getBitSet implementation#175
Fix broken main branch by providing correct getBitSet implementation#175BewareMyPower wants to merge 2 commits intoapache:mainfrom
Conversation
### Motivation Currently the main branch is broken by the concurrent merge of apache#153 and apache#151. It's because when a batched message id is constructed from deserialization, there is no `getBitSet` implementation of the internal acker. ### Modifications Add a `bool` parameter to `MessageIdImpl::getBitSet` to indicate whether the message ID is batched. The logic is similar with https://github.com/apache/pulsar/blob/299bd70fdfa023768e94a8ee4347d39337b6cbd4/pulsar-client/src/main/java/org/apache/pulsar/client/impl/PersistentAcknowledgmentsGroupingTracker.java#L325-L327 and https://github.com/apache/pulsar/blob/299bd70fdfa023768e94a8ee4347d39337b6cbd4/pulsar-client/src/main/java/org/apache/pulsar/client/impl/PersistentAcknowledgmentsGroupingTracker.java#L345-L347 Add a `testMessageIdFromBuild` to test the acknowledgment for a message ID without an acker could succeed for a consumer that enables batch index ACK. ### TODO In future, apache/pulsar#19031 might be migrated into the C++ client to fix the consumer that disables batch index ACK.
|
I have a question:
Is the code related to this passage here? pulsar-client-cpp/lib/MessageIdBuilder.cc Lines 45 to 47 in d03ff20 Is setting bitSize equal to 0 for lazy initialization? To save memory? If pulsar-client-cpp/lib/BatchedMessageIdImpl.h Lines 38 to 40 in f860566 |
| @@ -37,14 +37,16 @@ class BatchMessageAcker { | |||
| // by deserializing from raw bytes. | |||
There was a problem hiding this comment.
The modification of this class to have solved the compilation error. Can we first open a new PR to merge it?
There was a problem hiding this comment.
I will modify this PR after #177 is merged.
Motivation
Currently the main branch is broken by the concurrent merge of #153 and #151. It's because when a batched message id is constructed from deserialization, there is no
getBitSetimplementation of the internal acker.Modifications
Add a
boolparameter toMessageIdImpl::getBitSetto indicate whether the message ID is batched. The logic is similar withhttps://github.com/apache/pulsar/blob/299bd70fdfa023768e94a8ee4347d39337b6cbd4/pulsar-client/src/main/java/org/apache/pulsar/client/impl/PersistentAcknowledgmentsGroupingTracker.java#L325-L327
and
https://github.com/apache/pulsar/blob/299bd70fdfa023768e94a8ee4347d39337b6cbd4/pulsar-client/src/main/java/org/apache/pulsar/client/impl/PersistentAcknowledgmentsGroupingTracker.java#L345-L347
Add a
testMessageIdFromBuildto test the acknowledgment for a message ID without an acker could succeed for a consumer that enables batch index ACK.TODO
In future, apache/pulsar#19031 might be migrated into the C++ client to fix the consumer that disables batch index ACK.
Documentation
doc-required(Your PR needs to update docs and you will update later)
doc-not-needed(Please explain why)
doc(Your PR contains doc changes)
doc-complete(Docs have been already added)