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/09/14 23:03:06 UTC

[GitHub] [pulsar] merlimat opened a new pull request, #17658: [C++] Reset `havePendingPingRequest` flag for any data received from broker

merlimat opened a new pull request, #17658:
URL: https://github.com/apache/pulsar/pull/17658

   ### Motivation
   
   The C++ client is waiting to receive a `Pong` response from broker and if it's not received within 30 seconds, it will forcefully close the connection, assuming the broker is unresponsive. 
   
   Java client was changed, a long time ago, to reset the `havePendingPingRequest` every time some data is read from the socket, instead of just when receiving the Ping response.
   
   In C++, what can happen is that if there is a lot of messages being sent to the broker, and consequently lot of responses from the broker, ***and*** the application callbacks are taking long time (either blocking or just using a lot of CPU), then the Ping response might be sitting behind a lot of broker replies and it might take more than 30 seconds to actually process it.
   
   During this time, we are still reading data from the socket and we shouldn't be considering the connection dead.
   
   ### Modifications
   
   In the C++ client, use the same logic used for Java client and treat any data read from the connection as a signal that the connection is healthy.
   
   


-- 
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 #17658: [C++] Reset `havePendingPingRequest` flag for any data received from broker

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


-- 
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] github-actions[bot] commented on pull request #17658: [C++] Reset `havePendingPingRequest` flag for any data received from broker

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #17658:
URL: https://github.com/apache/pulsar/pull/17658#issuecomment-1247386095

   @merlimat Please provide a correct documentation label for your PR.
   Instructions see [Pulsar Documentation Label Guide](https://docs.google.com/document/d/1Qw7LHQdXWBW9t2-r-A7QdFDBwmZh6ytB4guwMoXHqc0).


-- 
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] github-actions[bot] commented on pull request #17658: [C++] Reset `havePendingPingRequest` flag for any data received from broker

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #17658:
URL: https://github.com/apache/pulsar/pull/17658#issuecomment-1247389444

   @merlimat Please provide a correct documentation label for your PR.
   Instructions see [Pulsar Documentation Label Guide](https://docs.google.com/document/d/1Qw7LHQdXWBW9t2-r-A7QdFDBwmZh6ytB4guwMoXHqc0).


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