Skip to content
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

Ability to recreate the coreSocketFactory in CoreSocketFactory #776

Closed
meltsufin opened this issue Mar 14, 2022 · 6 comments · Fixed by #1688
Closed

Ability to recreate the coreSocketFactory in CoreSocketFactory #776

meltsufin opened this issue Mar 14, 2022 · 6 comments · Fixed by #1688
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@meltsufin
Copy link
Member

Currently, coreSocketFactory is a singleton, and there is no way to recreate it after it has been created.

Needed here: GoogleCloudPlatform/spring-cloud-gcp#982

@kurtisvg
Copy link
Contributor

The change needed for this will probably be somewhat involved as there are a bunch of assumptions in the current code that the CoreSocketFactory stays the same throughout.

@meltsufin
Copy link
Member Author

@kurtisvg Can you give an example of such an assumption? Thanks!

@kurtisvg
Copy link
Contributor

So looking at the code, it might not be as bad as I thought (I was originally thinking about replacing the Admin API client). I think the biggest problem is making sure the executor is shutdown correctly and that all of the instances in the hashmap are "cleaned up" correctly (and that the hashamp is reset)

We'll obviously need to make sure the method used to reset the instance is synchronized as well, and make sure none of the static methods rely on the codeSocketFactory directly and unsynchronized - they need to be using getInstance (we may have a couple of examples of this already).

@enocom
Copy link
Member

enocom commented Mar 16, 2023

We're working through some significant refactoring in the core socket factory right now and will be able to revisit this request. As part of recreating the singleton, we'd be resetting the cached TLS certificates and basically starting again from scratch. Is that the expected behavior @meltsufin?

@meltsufin
Copy link
Member Author

Yes, having a public API to reset it is the requirement there.

@hessjcg hessjcg closed this as completed in 310624d Nov 7, 2023
@hessjcg
Copy link
Collaborator

hessjcg commented Nov 13, 2023

#1604 did not fix the whole issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants