-
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
[Java Client] Send CloseProducer on timeout #13161
Merged
Merged
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
michaeljmarshall
requested review from
merlimat,
lhotari,
eolivelli,
codelipenghui and
BewareMyPower
December 7, 2021 05:51
/pulsarbot run-failure-checks |
2 similar comments
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
nicoloboschi
approved these changes
Dec 7, 2021
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
Closing and reopening to get the fix to the |
/pulsarbot run-failure-checks |
merlimat
approved these changes
Dec 9, 2021
merlimat
added
release/2.8.3
release/2.9.1
type/bug
The PR fixed a bug or issue reported a bug
labels
Dec 9, 2021
lhotari
pushed a commit
that referenced
this pull request
Dec 10, 2021
* [Java Client] Send CloseProducer on timeout * Fix failed test from ClientErrorsTest (cherry picked from commit 27d5429)
lhotari
added
cherry-picked/branch-2.8
Archived: 2.8 is end of life
release/2.8.2
and removed
release/2.8.3
labels
Dec 10, 2021
lhotari
pushed a commit
that referenced
this pull request
Dec 10, 2021
* [Java Client] Send CloseProducer on timeout * Fix failed test from ClientErrorsTest (cherry picked from commit 27d5429)
codelipenghui
pushed a commit
that referenced
this pull request
Dec 11, 2021
* [Java Client] Send CloseProducer on timeout * Fix failed test from ClientErrorsTest (cherry picked from commit 27d5429)
fxbing
pushed a commit
to fxbing/pulsar
that referenced
this pull request
Dec 19, 2021
* [Java Client] Send CloseProducer on timeout * Fix failed test from ClientErrorsTest
1 task
1 task
RobertIndie
pushed a commit
to apache/pulsar-client-go
that referenced
this pull request
Jul 20, 2023
### Motivation This change is the same as apache/pulsar#13161 and apache/pulsar#16616, and is justified by these lines of our binary protocol spec: * https://github.com/apache/pulsar-site/blob/9b4b3d39014bd47c0bb9f66742b89bcb40ed7f07/docs/developing-binary-protocol.md?plain=1#L301-L304 * https://github.com/apache/pulsar-site/blob/9b4b3d39014bd47c0bb9f66742b89bcb40ed7f07/docs/developing-binary-protocol.md?plain=1#L468-L471 ### Modifications * When a producer or a consumer times out during creation, make an attempt to close the producer or consumer by sending the appropriate close command. Failures can safely be ignored because the only time that the close will actually matter is when the TCP connection is open for other protocol messages. The one nuance is that we send the close command to the same address pair that we send the create command.
RobertIndie
pushed a commit
to apache/pulsar-client-go
that referenced
this pull request
Sep 7, 2023
### Motivation This change is the same as apache/pulsar#13161 and apache/pulsar#16616, and is justified by these lines of our binary protocol spec: * https://github.com/apache/pulsar-site/blob/9b4b3d39014bd47c0bb9f66742b89bcb40ed7f07/docs/developing-binary-protocol.md?plain=1#L301-L304 * https://github.com/apache/pulsar-site/blob/9b4b3d39014bd47c0bb9f66742b89bcb40ed7f07/docs/developing-binary-protocol.md?plain=1#L468-L471 ### Modifications * When a producer or a consumer times out during creation, make an attempt to close the producer or consumer by sending the appropriate close command. Failures can safely be ignored because the only time that the close will actually matter is when the TCP connection is open for other protocol messages. The one nuance is that we send the close command to the same address pair that we send the create command. (cherry picked from commit d4e08c6)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/client
cherry-picked/branch-2.7
Archived: 2.7 is end of life
cherry-picked/branch-2.8
Archived: 2.8 is end of life
cherry-picked/branch-2.9
Archived: 2.9 is end of life
doc-not-needed
Your PR changes do not impact docs
release/2.7.4
release/2.8.2
release/2.9.1
type/bug
The PR fixed a bug or issue reported a bug
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
When producer creation times out, send the
CloseProducer
before sending a command to recreate theProducer
. This ensures a better time to recovery.This issue was discussed on the mailing list here, https://lists.apache.org/thread/tko0z4jg0oq0yf931rbow2zf9fq8wjt1. The protocol spec has already been updated to indicate that this is the correct client behavior #12948.
Modifications
CloseProducer
when the producer creation times out.close()
in the modified test file.Verifying this change
I added tests to verify this change.
Does this pull request potentially affect one of the following parts:
There are no breaking changes. This is an improvement to the protocol. The previous implementation was valid, but not ideal.
Documentation
no-need-doc
Docs were added here: [Protocol] Add guidance to send CloseProducer before sending Producer… #12948