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
Resolve index names to Index instances early #17048
Merged
s1monw
merged 1 commit into
elastic:master
from
s1monw:use_concrete_index_on_clusterstate_update
Mar 14, 2016
Merged
Resolve index names to Index instances early #17048
s1monw
merged 1 commit into
elastic:master
from
s1monw:use_concrete_index_on_clusterstate_update
Mar 14, 2016
Conversation
This file contains 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
@@ -65,6 +68,7 @@ | |||
private String source; | |||
|
|||
private boolean updateAllTypes = false; | |||
private Index concretIndex; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
misspelling: concreteIndex
Left minor comments. No second round of reviews needed on my part. Thanks @s1monw |
s1monw
force-pushed
the
use_concrete_index_on_clusterstate_update
branch
4 times, most recently
from
March 14, 2016 09:35
36e702b
to
7829ef2
Compare
s1monw
force-pushed
the
use_concrete_index_on_clusterstate_update
branch
from
March 14, 2016 09:59
7829ef2
to
5ad18b1
Compare
Today index names are often resolved lazily, only when they are really needed. This can be problematic especially when it gets to mapping updates etc. when a node sends a mapping update to the master but while the request is in-flight the index changes for whatever reason we would still apply the update since we use the name of the index to identify the index in the clusterstate. The problem is that index names can be reused which happens in practice and sometimes even in a automated way rendering this problem as realistic. In this change we resolve the index including it's UUID as early as possible in places where changes to the clusterstate are possible. For instance mapping updates on a node use a concrete index rather than it's name and the master will fail the mapping update iff the index can't be found by it's <name, uuid> tuple. Closes elastic#17048
s1monw
force-pushed
the
use_concrete_index_on_clusterstate_update
branch
from
March 14, 2016 10:09
5ad18b1
to
31740e2
Compare
s1monw
added a commit
that referenced
this pull request
Mar 14, 2016
…ate_update Resolve index names to Index instances early Today index names are often resolved lazily, only when they are really needed. This can be problematic especially when it gets to mapping updates etc. when a node sends a mapping update to the master but while the request is in-flight the index changes for whatever reason we would still apply the update since we use the name of the index to identify the index in the clusterstate. The problem is that index names can be reused which happens in practice and sometimes even in a automated way rendering this problem as realistic. In this change we resolve the index including it's UUID as early as possible in places where changes to the clusterstate are possible. For instance mapping updates on a node use a concrete index rather than it's name and the master will fail the mapping update iff the index can't be found by it's <name, uuid> tuple. Closes #17048
thanks @ywelsch for the review |
clintongormley
added
:Distributed/Distributed
A catch all label for anything in the Distributed Area. If you aren't sure, use this one.
and removed
:Cluster
labels
Feb 13, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
:Distributed/Distributed
A catch all label for anything in the Distributed Area. If you aren't sure, use this one.
>enhancement
resiliency
v5.0.0-alpha1
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 index names are often resolved lazily, only when they are really
needed. This can be problematic especially when it gets to mapping updates
etc. when a node sends a mapping update to the master but while the request
is in-flight the index changes for whatever reason we would still apply the update
since we use the name of the index to identify the index in the clusterstate.
The problem is that index names can be reused which happens in practice and sometimes
even in a automated way rendering this problem as realistic.
In this change we resolve the index including it's UUID as early as possible in places
where changes to the clusterstate are possible. For instance mapping updates on a node use a
concrete index rather than it's name and the master will fail the mapping update iff
the index can't be found by it's <name, uuid> tuple.