-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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 premature termination of transaction client #23710
Conversation
Signed-off-by: asheryer <asheryer@amazon.com>
Please add a crashing test? Thank you. /wait |
Do you mean as a unit test? |
Either a unit or integration test that crashes without the fix. |
I think that the current testing infrastructure is not capable of reproducing this scenario. This would require a dedicated uplink connection that closes before all the pipelined responses are sent downstream. I could be wrong though, because I don't have a full understanding of the testing infra in envoy. Is there another test/s that I could use as a reference? |
I'm quite sure you can reproduce this with an integration test. See https://github.com/envoyproxy/envoy/blob/main/test/extensions/filters/network/redis_proxy/redis_proxy_integration_test.cc |
(Note that if we can't quickly get this fixed/merged with a test we can revert the original PR while it gets sorted out. Thank you.) |
Signed-off-by: asheryer <asheryer@amazon.com>
Signed-off-by: asheryer <asheryer@amazon.com>
Signed-off-by: asheryer <asheryer@amazon.com>
Signed-off-by: asheryer <asheryer@amazon.com>
Signed-off-by: asheryer <asheryer@amazon.com>
@mattklein123 I've managed to successfully add a crash test (PipelinedTransactionTest).
|
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.
Awesome, thank you!
Signed-off-by: asheryer asheryer@amazon.com
This commit fixes the issue #23651
found by @untitaker
When pipelining a transaction the transaction connection terminates early which causes a segmentation fault.
I fixed this by checking that there are no more pending requests before closing the transaction.
I've tested this with several different scenarios and it works well.
Transactions can be pipelined now through envoy:
Commit Message: Fix premature termination of transaction client
Additional Description: When transactions are pipelined the transaction client terminates early and this causes a segmentation fault.
Risk Level: Low
Testing: Local redis cluster
Docs Changes: Not needed
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue] #23651
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]