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 2020/05/09 06:12:00 UTC

[GitHub] [pulsar] BewareMyPower opened a new pull request #6926: [C++] Release the unused spots of pending message queue

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


   ### Motivation
   
   If messages were sent in batch, every single message would reserve one spot of producer's pending message queue, but only one batched message would be pushed to the queue. Therefore there may exist many unused spots when `ProducerQueueIsFull` happened.
   
   Besides, if a message was too big or failed to be encrypted, `sendAsync` failed immediately but the reserved spot won't be released.
   
   ### Modifications
   
   - Add a `bool` return value to `add` / `sendMessages` methods of `BatchMessageContainer` to indicate whether the batched message was sent to producer's queue, i.e., passed to `producer_.sendMessage`.
   - If the batched message failed to be sent to producer's queue, or the N-th (N>1) message was added to the batch, the reserved spot in `sendAsync` would be released.
   - Test sending a batch with a 2-spots pending message queue, one spot for storing the batched message, another spot for preventing `ProducerQueueIsFull` error.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   This change is already covered by existing tests, such as `BatchMessageTest.testSendCallback`.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower commented on pull request #6926: [C++] Release the unused spots of pending message queue

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


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower commented on pull request #6926: [C++] Release the unused spots of pending message queue

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


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower commented on pull request #6926: [C++] Release the unused spots of pending message queue

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


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower commented on pull request #6926: [C++] Release the unused spots of pending message queue

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


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower commented on pull request #6926: [C++] Release the unused spots of pending message queue

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


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower commented on pull request #6926: [C++] Release the unused spots of pending message queue

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


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower commented on pull request #6926: [C++] Release the unused spots of pending message queue

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


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower commented on pull request #6926: [C++] Release the unused spots of pending message queue

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


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui merged pull request #6926: [C++] Release the unused spots of pending message queue

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


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower removed a comment on pull request #6926: [C++] Release the unused spots of pending message queue

Posted by GitBox <gi...@apache.org>.
BewareMyPower removed a comment on pull request #6926:
URL: https://github.com/apache/pulsar/pull/6926#issuecomment-626310073






----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower commented on pull request #6926: [C++] Release the unused spots of pending message queue

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


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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:
users@infra.apache.org