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

Reset TieredMP settings only if the value actually changed #9497

Merged
merged 1 commit into from Jan 30, 2015

Conversation

s1monw
Copy link
Contributor

@s1monw s1monw commented Jan 30, 2015

Due to some unreleased refactorings we lost the persitence of
a perviously set values in TieredMPProvider. This commit adds this
back and adds a simple unittest.

Closes #8890

@mikemccand
Copy link
Contributor

LGTM

@mikemccand
Copy link
Contributor

I wonder if this is the cause of #8890

@s1monw
Copy link
Contributor Author

s1monw commented Jan 30, 2015

I wonder if this is the cause of #8890

yes indeed.... I will fix the other providers too and add tests

TieredMergePolicyProvider mp = new TieredMergePolicyProvider(createStore(EMPTY_SETTINGS), service);
assertThat(mp.getMergePolicy().getNoCFSRatio(), equalTo(0.1));

assertEquals(mp.getMergePolicy().getForceMergeDeletesPctAllowed(), TieredMergePolicyProvider.DEFAULT_EXPUNGE_DELETES_ALLOWED, 0.0d);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to add a check that other settings do not spring back to their defaults, which I believe was the original issue (update one setting and have all the rest go back to default).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see the bottom of the test there is a update call with empty settings

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missed that. All good then. Sorry for the noise.

@bleskes
Copy link
Contributor

bleskes commented Jan 30, 2015

Fix LGTM. Added one comment about the test.

@bleskes
Copy link
Contributor

bleskes commented Jan 30, 2015

Thanks for picking it up! 👍

@s1monw
Copy link
Contributor Author

s1monw commented Jan 30, 2015

@mikemccand @bleskes I fixed the other MPs as well can you take a look?

Due to some unreleased refactorings we lost the persitence of
a perviously set values in MergePolicyProvider. This commit adds this
back and adds a simple unittest.

Closes elastic#8890
@s1monw s1monw merged commit 380fcd1 into elastic:master Jan 30, 2015
@s1monw s1monw removed the review label Jan 30, 2015
@s1monw s1monw deleted the fix_tiered_mp branch January 30, 2015 22:40
@clintongormley clintongormley changed the title Reset TieredMP settings only if the value actually changed Settings: Reset TieredMP settings only if the value actually changed Feb 10, 2015
@clintongormley clintongormley changed the title Settings: Reset TieredMP settings only if the value actually changed Reset TieredMP settings only if the value actually changed Jun 8, 2015
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.

Merge policy settings are ignored when set in YML
4 participants