hcm: Handle stream destroy during encodeData due to sendLocalReply#15075
Merged
mattklein123 merged 7 commits intoenvoyproxy:mainfrom Mar 17, 2021
Merged
hcm: Handle stream destroy during encodeData due to sendLocalReply#15075mattklein123 merged 7 commits intoenvoyproxy:mainfrom
mattklein123 merged 7 commits intoenvoyproxy:mainfrom
Conversation
Signed-off-by: Teju Nareddy <nareddyt@google.com>
Contributor
Author
|
Hi @alyssawilk and @snowp, can you double check the logic in the PR description makes sense? I only have a rough understanding of the HCM control flow. @alyssawilk introduced the assertion in #7720. @snowp fixed a similar bug ( |
snowp
reviewed
Feb 17, 2021
Signed-off-by: Teju Nareddy <nareddyt@google.com>
Contributor
|
Sorry was out Thursday/Friday. I've commented in the original PR but I think ideally we should not hit this function at all in the local-reply-sent case so let's hash out a plan there and revisit this if needed, sound good? |
Contributor
Author
|
No problem! I'll close this PR in favor of the discussion in #14906 |
# Conflicts: # source/common/http/filter_manager.h Signed-off-by: Teju Nareddy <nareddyt@google.com>
Signed-off-by: Teju Nareddy <nareddyt@google.com>
Contributor
Author
|
@mattklein123 here is the change from #14906 split out, with a dedicated core test. |
Member
|
Great, thanks. |
alyssawilk
previously approved these changes
Mar 16, 2021
mattklein123
requested changes
Mar 16, 2021
Member
mattklein123
left a comment
There was a problem hiding this comment.
Thanks LGTM with small comment.
/wait
Signed-off-by: Teju Nareddy <nareddyt@google.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Commit Message:
hcm: Handle stream destroy during encodeData due to sendLocalReply
Additional Description:
Fixes an issue that surfaced when adding buffer limits to the grpc_json_transcoder filter in #14906.
When
sendLocalReplyoccurs duringencodeData, the stream is reset because headers were already sent.Short-circuit the logic as the data buffer does not need to be handled - the
sendLocalReplyshould be shipped back right away.Risk Level:
Medium. Changes existing logic in HCM, but has integration tests.
Testing:
Integration test here and in grpc_json_transcoder filter (#14906).
Docs Changes:
None
Release Notes:
None
Platform Specific Features:
None
Signed-off-by: Teju Nareddy nareddyt@google.com