You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/02/13 13:20:52 UTC

[GitHub] [pulsar] Technoboy- opened a new pull request #14260: Fix PersistentAcknowledgmentsGroupingTracker set BitSet issue.

Technoboy- opened a new pull request #14260:
URL: https://github.com/apache/pulsar/pull/14260


   ### Motivation
   
   When consumers set `enableBatchIndexAcknowledgment=true`, client will execute PersistentAcknowledgmentsGroupingTracker#doIndividualBatchAckAsync :
   https://github.com/apache/pulsar/blob/8928c3496a61c588b50461d6adaab089dd421619/pulsar-client/src/main/java/org/apache/pulsar/client/impl/PersistentAcknowledgmentsGroupingTracker.java#L357-L372
   
   There is an error in line 367, it should be 
   `value.set(0, batchMessageId.getBatchSize()); `
   
   But batchMessageId.getBatchSize() always return acker.getBatchSize():
   https://github.com/apache/pulsar/blob/8928c3496a61c588b50461d6adaab089dd421619/pulsar-client/src/main/java/org/apache/pulsar/client/impl/BatchMessageIdImpl.java#L137-L139
   
   If line 362 is false, BatchMessageIdImpl only has acker with BatchMessageAckerDisabled which batch is always 0.
   So I have added `getOriginalBatchSize` to return the user-specified batch size.
   
   Then, when print logs in line 556, `pendingIndividualBatchIndexAcks` is always empty. Should replace with `entriesToAck`
   
   ### Documentation
   
   - [x] `no-need-doc` 
     
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui merged pull request #14260: Fix PersistentAcknowledgmentsGroupingTracker set BitSet issue.

Posted by GitBox <gi...@apache.org>.
codelipenghui merged pull request #14260:
URL: https://github.com/apache/pulsar/pull/14260


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on pull request #14260: Fix PersistentAcknowledgmentsGroupingTracker set BitSet issue.

Posted by GitBox <gi...@apache.org>.
lhotari commented on pull request #14260:
URL: https://github.com/apache/pulsar/pull/14260#issuecomment-1038779124


   The patch applies cleanly to branch-2.8 and I don't see a reason why it shouldn't be cherry-picked to branch-2.8 since this is a bug fix.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari edited a comment on pull request #14260: Fix PersistentAcknowledgmentsGroupingTracker set BitSet issue.

Posted by GitBox <gi...@apache.org>.
lhotari edited a comment on pull request #14260:
URL: https://github.com/apache/pulsar/pull/14260#issuecomment-1038748647


   Is this fix needed for branch-2.8 ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on pull request #14260: Fix PersistentAcknowledgmentsGroupingTracker set BitSet issue.

Posted by GitBox <gi...@apache.org>.
lhotari commented on pull request #14260:
URL: https://github.com/apache/pulsar/pull/14260#issuecomment-1038788156


   > So I have added getOriginalBatchSize to return the user-specified batch size.
   
   @Technoboy- what does the "user-specified batch size" mean? I'd assume that each batch message has a batch size of what the actual batch size for that message is?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on pull request #14260: Fix PersistentAcknowledgmentsGroupingTracker set BitSet issue.

Posted by GitBox <gi...@apache.org>.
lhotari commented on pull request #14260:
URL: https://github.com/apache/pulsar/pull/14260#issuecomment-1038748647


   Does this fix apply for the maintenance branches (branch-2.8, branch-2.9)?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org