Only filter intial recovery (post API) when shrinking an index#18661
Merged
s1monw merged 3 commits intoelastic:masterfrom Jun 2, 2016
Merged
Only filter intial recovery (post API) when shrinking an index#18661s1monw merged 3 commits intoelastic:masterfrom
s1monw merged 3 commits intoelastic:masterfrom
Conversation
Today we use `index.routing.allocation.include._id` to filter the allocation for the shrink target index. That has the sideeffect that the user has to delete that setting / change it once the primary has been recovered (shrink is done) This PR adds a dedicated filter that can only be set internally that only filters allocation for unassigned shards.
Contributor
Author
|
hmm I guess I should have a unittest for this as well... adding... |
Contributor
Author
|
@ywelsch I added a test - do you mind looking at it |
| .put("index.routing.allocation.include._id", | ||
| // we use "i.r.a.initial_recovery" rather than "i.r.a.require|include" since we want the replica to allocate right away | ||
| // once we are allocated. | ||
| .put("index.routing.allocation.initial_recovery._id", |
Contributor
There was a problem hiding this comment.
We could remove this setting once all shards have been activated (in AllocationService.updateMetaDataWithRoutingTable()).
Contributor
Author
There was a problem hiding this comment.
I am not sure it's worth the trouble? i kind of like the history we are getting with settings like this?
Contributor
There was a problem hiding this comment.
Ok, I understand that. I also don't like the added complexity of having this removal code in another place...
Contributor
|
Left minor comments and wonder if we should clean up the private setting once all shards have been activated. |
Contributor
Author
|
@ywelsch pushed a new commit |
Contributor
|
LGTM. Thanks @s1monw! |
jasontedor
added a commit
to rjernst/elasticsearch
that referenced
this pull request
Jun 3, 2016
* master: (911 commits) [TEST] wait for yellow after setup doc tests (elastic#18726) Fix recovery throttling to properly handle relocating non-primary shards (elastic#18701) Fix merge stats rendering in RestIndicesAction (elastic#18720) [TEST] mute RandomAllocationDeciderTests.testRandomDecisions Reworked docs for index-shrink API (elastic#18705) Improve painless compile-time exceptions Adds UUIDs to snapshots Add test rethrottle test case for delete-by-query Do not start scheduled pings until transport start Adressing review comments Only filter intial recovery (post API) when shrinking an index (elastic#18661) Add tests to check that toQuery() doesn't return null Removing handling of null lucene query where we catch this at parse time Handle empty query bodies at parse time and remove EmptyQueryBuilder Mute failing assertions in IndexWithShadowReplicasIT until fix Remove allow running as root Add upgrade-not-supported warning to alpha release notes remove unrecognized javadoc tag from matrix aggregation module set ValuesSourceConfig fields as private Adding MultiValuesSource support classes and documentation to matrix stats agg module ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Today we use
index.routing.allocation.include._idto filter the allocationfor the shrink target index. That has the sideeffect that the user has to
delete that setting / change it once the primary has been recovered (shrink is done)
This PR adds a dedicated filter that can only be set internally that only filters
allocation for unassigned shards.
@ywelsch do you wanna take a look?