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

Don't reset non-dynamic settings unless explicitly requested #21646

Merged
merged 4 commits into from Nov 18, 2016

Conversation

Projects
None yet
2 participants
@s1monw
Copy link
Contributor

commented Nov 18, 2016

AbstractScopedSettings has the ability to only apply updates/deletes
to dynamic settings. The flag is currently not respected when a setting
is reset/deleted which causes static node settings to be reset if a non-dynamic
key is reset via null value.

Closes #21593

s1monw added some commits Nov 18, 2016

Don't reset non-dynamic settings unless explicitly requested
AbstractScopedSettings has the ability to only apply updates/deletes
to dynamic settings. The flag is currently not respected when a setting
is reset/deleted which causes static node settings to be reset if a non-dynamic
key is reset via `null` value.

Closes #21593

@s1monw s1monw force-pushed the s1monw:issues/21593 branch to c447d83 Nov 18, 2016

boolean changed = false;
for (String entry : deletes) {
Set<String> keysToRemove = new HashSet<>();
Set<String> keySet = builder.internalMap().keySet();
for (String key : keySet) {
if (Regex.simpleMatch(entry, key)) {
if (Regex.simpleMatch(entry, key) && canRemove.test(key)) {

This comment has been minimized.

Copy link
@javanna

javanna Nov 18, 2016

Member

given that we already check if we can remove before adding to the deletes set, do we still have to check it here?

This comment has been minimized.

Copy link
@s1monw

s1monw Nov 18, 2016

Author Contributor

I added a comment in the code why we do this here

This comment has been minimized.

Copy link
@javanna
@javanna
Copy link
Member

left a comment

LGTM

@s1monw s1monw merged commit 99f8c21 into elastic:master Nov 18, 2016

1 of 2 checks passed

elasticsearch-ci Build started sha1 is merged.
Details
CLA Commit author is a member of Elasticsearch
Details

@s1monw s1monw deleted the s1monw:issues/21593 branch Nov 18, 2016

s1monw added a commit that referenced this pull request Nov 18, 2016

Don't reset non-dynamic settings unless explicitly requested (#21646)
AbstractScopedSettings has the ability to only apply updates/deletes
to dynamic settings. The flag is currently not respected when a setting
is reset/deleted which causes static node settings to be reset if a non-dynamic
key is reset via `null` value.

Closes #21593

s1monw added a commit that referenced this pull request Nov 18, 2016

Don't reset non-dynamic settings unless explicitly requested (#21646)
AbstractScopedSettings has the ability to only apply updates/deletes
to dynamic settings. The flag is currently not respected when a setting
is reset/deleted which causes static node settings to be reset if a non-dynamic
key is reset via `null` value.

Closes #21593
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.