Skip to content
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

ReadOnlyEngine should update translog recovery state information (#39238) #39254

Merged
merged 2 commits into from
Feb 22, 2019

Conversation

tlrx
Copy link
Member

@tlrx tlrx commented Feb 21, 2019

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 #33888

…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
@tlrx tlrx added :Distributed Indexing/Engine Anything around managing Lucene and the Translog in an open shard. backport labels Feb 21, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

@tlrx tlrx merged commit c899f63 into elastic:6.7 Feb 22, 2019
@tlrx tlrx deleted the read-only-engine-recovery-state-6.7 branch February 22, 2019 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport :Distributed Indexing/Engine Anything around managing Lucene and the Translog in an open shard.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants