BewareMyPower commented on pull request #9072:
URL: https://github.com/apache/pulsar/pull/9072#issuecomment-754681663


   > why `blankPartitions + 1` in `UnAckedMessageTrackerEnabled` constructor ? 
If `timeoutMs_ == tickDurationInMs`, it will wait `2*timeoutMs_` to send 
redelivery messages at first timeout.
   > 
   > 
https://github.com/apache/pulsar/blob/afe6af2520362917668b9cc0eaa608e540dc8c50/pulsar-client-cpp/lib/UnAckedMessageTrackerEnabled.cc#L84-L88
   
   I think It's just a mistake. I guess the original author intended to do:
   
   ```c++
   
    int blankPartitions = (timeoutMs_ / tickDurationInMs_) + ((timeoutMs_ % 
tickDurationInMs_ == 0) ? 0 : 1);
    for (int i = 0; i < blankPartitions; i++) { 
   ```


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to