Fix close_connections_on_host_health_failure#11241
Conversation
close_connections_on_host_health_failure was disabled by the refactoring to make tcp_proxy use the TCP connection pool implementation. To fix it we: * Add a method to immediately close all active connections on a TCP conn pool. * Invoke this method instead of drainConnections() if close_connections_on_host_health_failure is set. Signed-off-by: Jonathan Oddy <jonathan.oddy@transferwise.com>
|
/retest |
|
🤷♀️ nothing to rebuild. |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s), but failed to run 2 pipeline(s). |
snowp
left a comment
There was a problem hiding this comment.
Thanks for working on this. Do you think you could come up with an integration test that verifies this behavior? Mostly so we can prevent this kind of regression from happening again.
|
This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
|
This pull request has been automatically closed because it has not had activity in the last 14 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
Test to show connections remain open if the flag is false. Test to show connections are closed if the flag is true. Signed-off-by: Jonathan Oddy <jonathan.oddy@transferwise.com>
|
@snowp Sorry for the delay, I've added some tests to the branch. |
Signed-off-by: Jonathan Oddy <jonathan.oddy@transferwise.com>
snowp
left a comment
There was a problem hiding this comment.
Thanks for adding a test! One question
@ggreenway mind taking a look as well?
ggreenway
left a comment
There was a problem hiding this comment.
This LGTM, aside from the comment and semicolon
Signed-off-by: Jonathan Oddy <jonathan.oddy@transferwise.com>
Signed-off-by: Jonathan Oddy <jonathan.oddy@transferwise.com>
close_connections_on_host_health_failure was disabled by the refactoring to make tcp_proxy use the TCP connection pool implementation. To fix it we: * Add a method to immediately close all active connections on a TCP conn pool. * Invoke this method instead of drainConnections() if close_connections_on_host_health_failure is set. Signed-off-by: Jonathan Oddy <jonathan.oddy@transferwise.com> Signed-off-by: yashwant121 <yadavyashwant36@gmail.com>
close_connections_on_host_health_failure was disabled by the refactoring to make tcp_proxy use the TCP connection pool implementation. To fix it we: * Add a method to immediately close all active connections on a TCP conn pool. * Invoke this method instead of drainConnections() if close_connections_on_host_health_failure is set. Signed-off-by: Jonathan Oddy <jonathan.oddy@transferwise.com> Signed-off-by: yashwant121 <yadavyashwant36@gmail.com>
close_connections_on_host_health_failure was disabled by the refactoring to make tcp_proxy use the TCP connection pool implementation. To fix it we: * Add a method to immediately close all active connections on a TCP conn pool. * Invoke this method instead of drainConnections() if close_connections_on_host_health_failure is set. Signed-off-by: Jonathan Oddy <jonathan.oddy@transferwise.com> Signed-off-by: yashwant121 <yadavyashwant36@gmail.com>
close_connections_on_host_health_failure was disabled by the refactoring to make tcp_proxy use the TCP connection pool implementation. To fix it we: * Add a method to immediately close all active connections on a TCP conn pool. * Invoke this method instead of drainConnections() if close_connections_on_host_health_failure is set. Signed-off-by: Jonathan Oddy <jonathan.oddy@transferwise.com>
close_connections_on_host_health_failure was disabled by the refactoring to make tcp_proxy use the TCP connection pool implementation. To fix it we: * Add a method to immediately close all active connections on a TCP conn pool. * Invoke this method instead of drainConnections() if close_connections_on_host_health_failure is set. Signed-off-by: Jonathan Oddy <jonathan.oddy@transferwise.com> Signed-off-by: yashwant121 <yadavyashwant36@gmail.com>
close_connections_on_host_health_failure was disabled by the refactoring to
make tcp_proxy use the TCP connection pool implementation.
To fix it we:
Additional Notes:
The breakage was introduced in the release immediately after the flag was introduced. It has been broken for some time (since v1.8). This fix may present some risk to users who currently have the flag enabled even though it doesn't work as documented, as the observed behaviour will change.
Risk Level: Low
Testing: Manual
Docs Changes: None