rdhabalia commented on a change in pull request #619: make batch-ack thread-safe
URL: https://github.com/apache/incubator-pulsar/pull/619#discussion_r130805588
 
 

 ##########
 File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java
 ##########
 @@ -338,15 +338,25 @@ boolean markAckForBatchMessage(BatchMessageIdImpl 
batchMessageId, AckType ackTyp
             return true;
         }
         int batchIndex = batchMessageId.getBatchIndex();
-        int batchSize = bitSet.length();
-        if (ackType == AckType.Individual) {
-            bitSet.clear(batchIndex);
-        } else {
-            // +1 since to argument is exclusive
-            bitSet.clear(0, batchIndex + 1);
+        // bitset is not thread-safe and requires external synchronization
+        int batchSize = 0;
 
 Review comment:
   `batchSize` is used for stats at line#376.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to