Refactor state format to use incremental state IDs#10316
Refactor state format to use incremental state IDs#10316s1monw merged 1 commit intoelastic:masterfrom
Conversation
There was a problem hiding this comment.
can we use Pattern.qoute for the prefix? just being paranoid..
|
@bleskes pushed a new commit |
|
I left one comment regarding the use of versions in determining the counter. Another thing I was wondering about is how we deal with the scenario 1.5.0 can live us in - a higher id legacy file, with a lower id and non legacy file. |
we don't deal with that at all. IMO this requires user interaction - no way to resolve it automatically and I don't think we should unless it's evident that there is a real problem here that happens regularly. |
Fair enough. Let's wait and see. |
|
@bleskes can you take another look? |
There was a problem hiding this comment.
rename this to StateIdAndLegacyPredicate?
|
LGTM |
Today there is a chance that the state version for shard, index or cluster state goes backwards or is reset on a full restart etc. depending on several factors not related to the state. To prevent any collisions with already existing state files and to maintain write-once properties this change introductes an incremental state ID instead of using the plain state version. This also fixes a bug when the previous legacy state had a greater version than the current state which causes an exception on node startup or if left-over files are present. Closes elastic#10316
89bba2e to
78d86bc
Compare
Today there is a chance that the state version for shard, index or cluster state goes backwards or is reset on a full restart etc. depending on several factors not related to the state. To prevent any collisions with already existing state files and to maintain write-once properties this change introductes an incremental state ID instead of using the plain state version. This also fixes a bug when the previous legacy state had a greater version than the current state which causes an exception on node startup or if left-over files are present. Closes elastic#10316
Today there is a chance that the state version for shard, index or cluster state goes backwards or is reset on a full restart etc. depending on several factors not related to the state. To prevent any collisions with already existing state files and to maintain write-once properties this change introductes an incremental state ID instead of using the plain state version. This also fixes a bug when the previous legacy state had a greater version than the current state which causes an exception on node startup or if left-over files are present. Closes elastic#10316
Today there is a chance that the state version for shard, index or cluster state goes backwards or is reset on a full restart etc. depending on several factors not related to the state. To prevent any collisions with already existing state files and to maintain write-once properties this change introductes an incremental state ID instead of using the plain state version. This also fixes a bug when the previous legacy state had a greater version than the current state which causes an exception on node startup or if left-over files are present. Closes elastic#10316
Today there is a chance that the state version for shard, index or cluster
state goes backwards or is reset on a full restart etc. depending on
several factors not related to the state. To prevent any collisions
with already existing state files and to maintain write-once properties
this change introductes an incremental state ID instead of using the plain
state version. This also fixes a bug when the previous legacy state had a
greater version than the current state which causes an exception on node
startup or if left-over files are present.