-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix broken main branch by providing correct getBitSet implementation #175
Fix broken main branch by providing correct getBitSet implementation #175
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
getBitSet
implementation of the internal acker.Modifications
Add a
bool
parameter toMessageIdImpl::getBitSet
to 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
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.
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)