-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
fix #3957: Lister onOpen
should be called before marking the connection open
#3958
Conversation
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 - but this primarily needs applied to master and can there be an update to the javadocs of our WebSocket.Builder.buildAsync to explicitly state the expectation that onOpen is called first - just to make sure that if for whatever reason we can't honor that we'll have to change the calling logic.
This happened because of eliminating the additional wait logic that was in the ExecWebSocketListener, so this is applicable to 5.11 as well.
The JDK client behavior is consistent with this change - the returned future from buildAsync will not be completed until after onOpen has been called (but that is not explicitly called out in the javadocs).
I added javadocs. Should I create pull requests for master and 5.11 as well? |
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
@manusa how do you usually handle porting to other branches - is that something that you usually just cherry-pick and update from there?
I switched this to master and added the backport label. I'm still not sure how I'm going to handle these ones, since some of the selected changes are going to be hard to move to 5.12. |
…he connection as open
SonarCloud Quality Gate failed. |
fix fabric8io#3995: addressing hung tests essentially one thread holding the reflector lock was waiting for the watch to start. Another thread via onOpen was trying to stop the reflector. I don't believe this happened before fabric8io#3958 the fix is to use an async watch start
essentially one thread holding the reflector lock was waiting for the watch to start. Another thread via onOpen was trying to stop the reflector. I don't believe this happened before fabric8io#3958 the fix is to use an async watch start
essentially one thread holding the reflector lock was waiting for the watch to start. Another thread via onOpen was trying to stop the reflector. I don't believe this happened before fabric8io#3958 the fix is to use an async watch start
Description
Fix #3957
In
PodOperationsImpl
class thebuildAsync
method is called withExecWebSocketListener
.The
ExecWebSocketListener
is openingoutputPipe
anderrorPipe
inonOpen
.If the
future
is completed before theoutputPipe
anderrorPipe
are open, then the consumer can read from the pipes before they are open.The pipes should be open first and then the future should be marked as complete.
Type of change
test, version modification, documentation, etc.)
Checklist