-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Remove version in ShardRouting (now obsolete) #16243
Remove version in ShardRouting (now obsolete) #16243
Conversation
@@ -337,7 +337,7 @@ public void updateRoutingEntry(final ShardRouting newRouting, final boolean pers | |||
} | |||
// if its the same routing except for some metadata info, return | |||
if (currentRouting.equalsIgnoringMetaData(newRouting)) { |
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.
does this check make any sense now that we have no versions?
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.
I replaced the check by an equals (no need to ignore metadata now). The check is still needed as we only want to call the shardRoutingChanged listener later if something changed.
This is great. Left some minor comments here and there... |
@bleskes pushed a new set of changes |
1171f07
to
6646f1e
Compare
@bleskes I rebased on current master (there were lots of conflicts due to the changes in Index class) |
@@ -132,10 +132,10 @@ public DiscoveryNode getNode() { | |||
} | |||
|
|||
/** | |||
* Version of the store | |||
* Version of the store for pre-3.0 shards that have not yet been active | |||
*/ | |||
public long getVersion() { |
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.
rename the method as well?
Thanks @ywelsch . Left some extremely minor comments. Feel free to address them and push when ready (or ping me if you feel another cycle is needed). |
ca8c1d9
to
bc49905
Compare
bc49905
to
4937531
Compare
Remove obsolete version in ShardRouting
writeReason = "freshly started, version [" + newRouting.version() + "]"; | ||
} else if (currentRouting.version() < newRouting.version()) { | ||
writeReason = "version changed from [" + currentRouting.version() + "] to [" + newRouting.version() + "]"; | ||
writeReason = "freshly started, allocation id [" + newRouting.allocationId() + "]"; |
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.
fyi - this gives you double [[]]
as breaking change removed as per: elastic#16243 because of: elastic#14739
With the changes in #14739, allocation ids are now being used to select primary shards instead of version information stored with the shard state on disk. As this was the only use case so far to carry version information in shard routing, we can safely remove it.