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 2021/05/07 14:49:25 UTC

[GitHub] [pulsar] BewareMyPower opened a new pull request #10507: [Java Client] Avoid sending flow requests with zero permits

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


   ### Motivation
   
   It's the Java client side fix for https://github.com/apache/pulsar/pull/10506.
   
   When broker receives a FLOW request with zero permit, an IllegalArgumentException will be thrown in ServerCnx#handleFlow and then the connection will be closed so that the consumer will reconnect to the broker. If `resume()` was called for a zero queue consumer, the permits may be zero and trigger a reconnection. The frequent reconnections may cause messages repeated or out of order.
   
   ### Modifications
   
   - Validate the permits of a FLOW command before sending it.
   - Add a test that a zero queue consumer resumes and pauses for each message periodically. Before this PR, there's a great chance that the received messages are repeated or out of order, even a ACK was sent.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   This change added tests `ZeroQueueSizeTest#testPauseAndResumeNoReconnection`.


-- 
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] merlimat merged pull request #10507: [Java Client] Avoid sending flow requests with zero permits

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


   


-- 
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 #10507: [Java Client] Avoid sending flow requests with zero permits

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


   /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