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/03/27 11:30:57 UTC

[GitHub] [pulsar] BewareMyPower opened a new pull request #14898: [C++] Fix send callback might not be invoked in key based batching

BewareMyPower opened a new pull request #14898:
URL: https://github.com/apache/pulsar/pull/14898


   ### Motivation
   
   When C++ client enables key based batching, there is a chance that the
   send callback is not invoked. See
   https://github.com/apache/pulsar/blob/32df93f693bfdf42953bd728a12ecdea1796dcc8/pulsar-client-cpp/lib/ProducerImpl.cc#L272-L275
   
   If a batch container has multiple batches, only one batch could be
   processed during `closeAsync`. Even worse, the semaphores of other
   batches won't be released.
   
   ### Modifications
   
   - Add a `clearPendingBatches` method to clear all pending batches and
     process them. Then call this method in `closeAsync` and
     `getPendingCallbacksWhenFailed`.
   - Add a test `testCloseBeforeSend` to verify when a producer has
     multiple pending batches, all callbacks can be invoked in
     `closeAsync`.


-- 
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] merlimat merged pull request #14898: [C++] Fix send callback might not be invoked in key based batching

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


   


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