Skip to content

Thrift: Do not reset downstream for partial response#23117

Merged
zuercher merged 2 commits intoenvoyproxy:mainfrom
JuniorHsu:localReplyForPartialResponse
Sep 16, 2022
Merged

Thrift: Do not reset downstream for partial response#23117
zuercher merged 2 commits intoenvoyproxy:mainfrom
JuniorHsu:localReplyForPartialResponse

Conversation

@JuniorHsu
Copy link
Copy Markdown
Contributor

Signed-off-by: kuochunghsu kuochunghsu@pinterest.com

Commit Message:
We've seen upstream connection is closed between response start and response end, which closes downstream connection and leads SR drop.

This disconnection is an intentional behavior from the service since thrift doesn't have a RST semantic.

In this diff, we do local reply to downstream instead of resetting it since we haven't sent any byte to downstream.

Risk Level: low
Testing: unit

Signed-off-by: kuochunghsu <kuochunghsu@pinterest.com>
initializeRouter();

EXPECT_CALL(callbacks_, resetDownstreamConnection());
// EXPECT_CALL(callbacks_, resetDownstreamConnection());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a test that invokes the underflow path?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for catch the leftover. yes there is.

TEST_F(ThriftRouterTest, TruncatedResponse) {

Signed-off-by: kuochunghsu <kuochunghsu@pinterest.com>
@zuercher zuercher merged commit 2c1f709 into envoyproxy:main Sep 16, 2022
@JuniorHsu JuniorHsu deleted the localReplyForPartialResponse branch September 19, 2022 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants