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

Prevent injection of unannotated dynamic settings #10763

Conversation

imotov
Copy link
Contributor

@imotov imotov commented Apr 24, 2015

Dynamic settings has to be injected into constructor with either @ClusterDynamicSettings or @IndexDynamicSettings. If annotations are not specified an empty instance of Dynamic Settings is injected that can lead to difficult to discover errors such as #10614. This commit will make any attempt to inject unannotated dynamic settings to generate a giuce error.

Alternatively, we could bind unannotated DynamicSettings to cluster dynamic settings by default, this will prevent the issue as well but in more quiet manner. Any other ideas?

@dakrone
Copy link
Member

dakrone commented May 4, 2015

LGTM, I am +1 on this change, I think it's good to avoid this, I would love to see us do something similar to this with @IndexSettings also (but that's a separate story entirely)

Dynamic settings has to be injected into constructor with either @ClusterDynamicSettings or @IndexDynamicSettings. If annotations are not specified an empty instance of Dynamic Settings is injected that can lead to difficult to discover errors such as elastic#10614. This commit will make any attempt to inject unannotated dynamic settings to generate a giuce error.
@imotov imotov force-pushed the issue-10614-prevent-injection-of-unannoted-dynamic-settings branch from 22c88aa to d2844e0 Compare May 8, 2015 22:50
@imotov imotov merged commit d2844e0 into elastic:master May 8, 2015
@clintongormley clintongormley changed the title Internal: prevent injection of unannotated dynamic settings Prevent injection of unannotated dynamic settings Jun 7, 2015
@imotov imotov deleted the issue-10614-prevent-injection-of-unannoted-dynamic-settings branch May 1, 2020 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants