-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[C++] Reset havePendingPingRequest
flag for any data received from broker
#17658
Merged
codelipenghui
merged 1 commit into
apache:master
from
merlimat:c++-update-pending-pong-response
Sep 15, 2022
Merged
[C++] Reset havePendingPingRequest
flag for any data received from broker
#17658
codelipenghui
merged 1 commit into
apache:master
from
merlimat:c++-update-pending-pong-response
Sep 15, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
merlimat
added
type/enhancement
The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
release/2.9.4
release/2.8.5
release/2.11.1
release/2.10.3
labels
Sep 14, 2022
merlimat
added
doc-not-needed
Your PR changes do not impact docs
and removed
doc-label-missing
labels
Sep 14, 2022
github-actions
bot
added
doc-label-missing
and removed
doc-not-needed
Your PR changes do not impact docs
labels
Sep 14, 2022
@merlimat Please provide a correct documentation label for your PR. |
shibd
approved these changes
Sep 15, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/LGTM
merlimat
added
doc-not-needed
Your PR changes do not impact docs
and removed
doc-label-missing
labels
Sep 15, 2022
github-actions
bot
added
doc-label-missing
and removed
doc-not-needed
Your PR changes do not impact docs
labels
Sep 15, 2022
BewareMyPower
approved these changes
Sep 15, 2022
github-actions
bot
added
doc-not-needed
Your PR changes do not impact docs
and removed
doc-label-missing
labels
Sep 15, 2022
RobertIndie
approved these changes
Sep 15, 2022
merlimat
added a commit
that referenced
this pull request
Sep 15, 2022
merlimat
added a commit
that referenced
this pull request
Sep 15, 2022
merlimat
added a commit
that referenced
this pull request
Sep 15, 2022
merlimat
added
cherry-picked/branch-2.8
Archived: 2.8 is end of life
cherry-picked/branch-2.9
Archived: 2.9 is end of life
cherry-picked/branch-2.10
cherry-picked/branch-2.11
labels
Sep 15, 2022
nicoloboschi
pushed a commit
to datastax/pulsar
that referenced
this pull request
Sep 16, 2022
…broker (apache#17658) (cherry picked from commit 55656b6)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cherry-picked/branch-2.8
Archived: 2.8 is end of life
cherry-picked/branch-2.9
Archived: 2.9 is end of life
cherry-picked/branch-2.10
cherry-picked/branch-2.11
doc-not-needed
Your PR changes do not impact docs
release/2.8.5
release/2.9.4
release/2.10.2
release/2.11.1
type/enhancement
The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Documentation
doc-required
(Your PR needs to update docs and you will update later)
doc-not-needed
(Please explain why)
doc
(Your PR contains doc changes)
doc-complete
(Docs have been already added)