upstream: code clean up of upstream cluster creation#26438
Merged
wbpcode merged 2 commits intoenvoyproxy:mainfrom Apr 1, 2023
Merged
upstream: code clean up of upstream cluster creation#26438wbpcode merged 2 commits intoenvoyproxy:mainfrom
wbpcode merged 2 commits intoenvoyproxy:mainfrom
Conversation
Signed-off-by: wbpcode <[email protected]>
Member
Author
|
This PR introduced lots of code change but has no any new function. But I still think it make sense in the long term to improve the code readability/maintainability. |
Member
Author
|
/retest |
|
Retrying Azure Pipelines: |
mattklein123
approved these changes
Mar 31, 2023
Member
mattklein123
left a comment
There was a problem hiding this comment.
Nice cleanup! Thank you.
RiverPhillips
pushed a commit
to RiverPhillips/envoy
that referenced
this pull request
Apr 7, 2023
Signed-off-by: wbpcode <[email protected]> Signed-off-by: River Phillips <[email protected]>
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: upstream: code clean up of upstream cluster creation
Additional Description:
In the previous impl, we will create a stats
Scopeinstance and aTransportSocketFactoryContextinstance for every cluster in theClusterFactoryImplBase::createcall.Both objects will be forwarded to
createClusterImplcall, and then be forwarded tocreateClusterWithConfigcall, and then be forwarded to construction method of cluster, and finally be forwarded to construction method ofClusterImplBase.Both objects finally will be managed by the new created cluster instance.
However, this long forwarding path make it's hard to track the lifetime of these objects or to understand these code.
This patch make a change to create both objects in the construction method of
ClusterImplBasedirectly.Risk Level: Mid.
Testing: n/a.
Docs Changes: n/a.
Release Notes: n/a.
Platform Specific Features: n/a.