ReadOnlyEngine should update translog recovery state information (#39238)#39251
Merged
tlrx merged 1 commit intoelastic:7.xfrom Feb 21, 2019
Merged
ReadOnlyEngine should update translog recovery state information (#39238)#39251tlrx merged 1 commit intoelastic:7.xfrom
tlrx merged 1 commit intoelastic:7.xfrom
Conversation
…stic#39238) `ReadOnlyEngine` never recovers operations from translog and never updates translog information in the index shard's recovery state, even though the recovery state goes through the `TRANSLOG` stage during the recovery. It means that recovery information for frozen shards indicates an unkown number of recovered translog ops in the Recovery APIs (translog_ops: `-1` and translog_ops_percent: `-1.0%`) and this is confusing. This commit changes the `recoverFromTranslog()` method in `ReadOnlyEngine` so that it always recover from an empty translog snapshot, allowing the recovery state translog information to be correctly updated. Related to elastic#33888
Collaborator
|
Pinging @elastic/es-distributed |
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.
ReadOnlyEnginenever recovers operations from translog and neverupdates translog information in the index shard's recovery state, even
though the recovery state goes through the
TRANSLOGstage duringthe recovery. It means that recovery information for frozen shards indicates
an unkown number of recovered translog ops in the Recovery APIs
(translog_ops:
-1and translog_ops_percent:-1.0%) and this is confusing.This commit changes the
recoverFromTranslog()method inReadOnlyEngineso that it always recover from an empty translog snapshot, allowing the recovery
state translog information to be correctly updated.
Related to #33888