listener: move active connection collection out of active tcp listener#16947
listener: move active connection collection out of active tcp listener#16947mattklein123 merged 32 commits intoenvoyproxy:mainfrom
Conversation
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <lambdai@google.com>
Signed-off-by: Yuchen Dai <lambdai@google.com>
Signed-off-by: Yuchen Dai <lambdai@google.com>
antoniovicente
left a comment
There was a problem hiding this comment.
Thanks for splitting this refactor from #16763. This change is significantly more possible to review.
Signed-off-by: Yuchen Dai <lambdai@google.com>
lambdai
left a comment
There was a problem hiding this comment.
Thank you for the review! I addressed most of them except the inc/decConnections.
|
/wait |
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
and push up Network::Connection op Signed-off-by: Yuchen Dai <silentdai@gmail.com>
antoniovicente
left a comment
There was a problem hiding this comment.
Yeah I understand it's just hard to track what is changing. My preference would be to wait until next week to see if @antoniovicente can finish this review. If that is not possible, would it be possible to just split again where you do the pure moves first (I think ActiveTcpSocket into its own file, etc.) and then the rest of it?
I'ld like a second opinion about the introduction of a template base class for code reuse. This kind of pattern has been a big source of complexity on past codebases I have been involved with. @mattklein123 could use your opinion. Other than that, I think this change is fine and is about as minimal as it can be except possibly the refactor to source/server/active_tcp_listener.h which exposes the inner classes.
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
|
This PR is ready to be reviewed again: It turns to be a create a thin reused layer OwnedActiveStreamListenerBase With this base class, ActiveConnection can be reused by both internal and tcp listener. And the error prone shared connection handling block are moved to here. |
mattklein123
left a comment
There was a problem hiding this comment.
Please split out pure moves from code changes so it's easier to review the actual changes. Thank you!
/wait
|
@mattklein123 The entire PR is almost code move(file to file), or method move(from class to base class) or rename(refer to base class instead of derived). I create a PR as your requested anyway: #17551 |
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
…nternallistener_pre_1 Signed-off-by: Yuchen Dai <silentdai@gmail.com>
…bridge-stream * upstream/main: (32 commits) tls: move ssl connection info into SocketAddressProvider (envoyproxy#17334) conn pool: default enable runtime feature `conn_pool_delete_when_idle` (envoyproxy#17577) api: LEDS api introduction (envoyproxy#17419) kafka: add support for api versions request in mesh-filter (envoyproxy#17475) ext_proc: Implement BUFFERED_PARTIAL processing mode (envoyproxy#17531) tooling: Async/pathlib/mypy cleanups and utils (envoyproxy#17505) xds: restructure CertificateProvider fields (envoyproxy#17201) Refactor OverloadIntegrationTest breaking out a test base, and the fake resource monitors. (envoyproxy#17530) listener: move active connection collection out of active tcp listener (envoyproxy#16947) tools: format checks for backticks (envoyproxy#17566) coverage: set lower limit for common/quic and common (envoyproxy#17573) v2: final source removal (envoyproxy#17565) test: bumping coverage (envoyproxy#17564) quic: enforcing header size and contents (envoyproxy#17520) Support for canonicalizing URI properly for AWS SigV4 signer (envoyproxy#17137) listener: add a stat for transport socket connect timeout (envoyproxy#17458) listener: add listen() error handling (envoyproxy#17427) http: return per route config when direct response is set (envoyproxy#17449) removing most v2 references from source/ (envoyproxy#17415) bug fix: return bootstrap when validating config (envoyproxy#17499) ... Signed-off-by: Garrett Bourg <bourg@squareup.com>
envoyproxy#16947) Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Commit Message:
#16763 is adding an internal listener. The internal listener is not driven by event dispatcher.
However, it shares the common functionalities of structuring the ownership of connections with the tcp listener.
This PR extracts the common functions out of ActiveTcpListener so those can be reused by internal listener.
The common includes
Additional Description:
Risk Level: LOW
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Deprecated:]
[Optional API Considerations:]