netty,alts: fire initial protocol negotiation event in WBAEH#5893
Merged
carl-mastrangelo merged 2 commits intogrpc:masterfrom Jun 18, 2019
Merged
netty,alts: fire initial protocol negotiation event in WBAEH#5893carl-mastrangelo merged 2 commits intogrpc:masterfrom
carl-mastrangelo merged 2 commits intogrpc:masterfrom
Conversation
This change is needed after trying to use the new style protocol negotiators internally. The problem is that some handlers fire the event in handlerAdded, which is too early. The followup PNE is fired after handlerAdded, which breaks the composibility of the negotiators. To fix this, this change modifies the negotiation flow. Specifically: * Negotiators should NEVER fire a negotiation from handlerAdded, instead they should wait until userEventTriggered * Negotiators now do state checking on the PNE. If it is set twice, it fails. If it has not been received when doing the next stage of negotiation, it fails. * WBAEH now fires the initial, default event. This is the only handler that can fire it from handlerAdded The tests updated are ones not using WBAEH (which they probably should). This change ensures attributes aren't lost when doing negotiation.
creamsoup
approved these changes
Jun 18, 2019
Contributor
creamsoup
left a comment
There was a problem hiding this comment.
LGTM. we are seeing some common patterns for negotiation handlers, we could have an abstract handler when the pattern is well established.
ejona86
approved these changes
Jun 18, 2019
Merged
carl-mastrangelo
added a commit
that referenced
this pull request
Jun 19, 2019
Followup to #5893 which causes a server side hang. This is a hack.
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This change is needed after trying to use the new style protocol negotiators internally. The problem is that some handlers fire the event in handlerAdded, which is too early. The followup PNE is fired after handlerAdded, which breaks the composibility of the negotiators.
To fix this, this change modifies the negotiation flow. Specifically:
The tests updated are ones not using WBAEH (which they probably should). This change ensures attributes aren't lost when doing negotiation.