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

Warn and/or protect against multiple parties updating HttpResources #416

Closed
rstoyanchev opened this issue Aug 16, 2018 · 1 comment
Closed
Labels
type/enhancement A general enhancement

Comments

@rstoyanchev
Copy link
Contributor

Global resources are very convenient and work transparently as long as all parties participate without customization. If multiple parties try to change the global resources via HttpResources, it should continue to work, as long as HttpResources.get() is used to access the resources, but the later changes would silently override the earlier ones, which could be tricky to find out and an unwelcome surprise.

In the very least consider adding WARN level log messages to warn that the global settings have been explicitly set (if resources were not yet created), and likewise warn that global settings have set again, overriding previous customization (if already created).

Possibly consider an even stronger measure such as to requiring an explicit reset or shutdown before settings can be changed again, in order to avoid silent overrides.

@violetagg
Copy link
Member

In the very least consider adding WARN level log messages to warn that the global settings have been explicitly set (if resources were not yet created), and likewise warn that global settings have set again, overriding previous customization (if already created).

With #452 a WARN message is added for both cases (create/update)

Possibly consider an even stronger measure such as to requiring an explicit reset or shutdown before settings can be changed again, in order to avoid silent overrides.

The current implementation disposes the previous loops/pools when updated
https://github.com/reactor/reactor-netty/blob/0.7.x/src/main/java/reactor/ipc/netty/tcp/TcpResources.java#L222

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants