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

Allows an engine start from any previous commit #27485

Closed
wants to merge 1 commit into from

Conversation

dnhatn
Copy link
Member

@dnhatn dnhatn commented Nov 21, 2017

This commit allows an engine to open with any previous commit, and
replay translog up to a given sequence number. This is a prepared step
to implement for the primary and replica recovery with rollback.

Relates #10708

This commit allows an engine to open with any previous commit, and
replay translog up to a given sequence number. This is a prepared step
to implement for the primary and replica recovery with rollback.
@dnhatn dnhatn added :Distributed/Recovery Anything around constructing a new shard, either from a local or a remote source. :Sequence IDs WIP labels Nov 21, 2017
@dnhatn
Copy link
Member Author

dnhatn commented Nov 21, 2017

The PR may not be ready but I open it to discuss. My concern is how to integrate a new introduced RecoveryConfig with the existing OpenMode. Having two options for a single thing is not good, and RecoveryConfig itself is not a good name. On the other hand, using only OpenMode requires a large change which is more likely to be rejected.

@bleskes
Copy link
Contributor

bleskes commented Nov 21, 2017

@dnhatn Thanks for picking this up and bringing it for discussion. I'm not fully online but I would like to discuss your thoughts about this approach. I haven't given it some thought in a while now, but if memory serves it will should be enough to delete commits which violate the max seq# >= global checkpoint rule in the onInit of the deletion policy.

Also - are you done with the feedback on the other PRs? I would hope to bring them to closure before discussing any follow up work.

@dnhatn
Copy link
Member Author

dnhatn commented Nov 21, 2017

Thanks @bleskes for your quick feedback.

Also - are you done with the feedback on the other PRs?

I have addressed your comments for #27268 and #27367. Would you mind taking another look?

It will should be enough to delete commits which violate the max seq# >= global checkpoint rule in the onInit of the deletion policy

Yes, for a replica, we should open with a proper commit and delete violated commits. However, for a primary we may want to open an engine with the last commit to minimize the number of replaying operations.

@bleskes
Copy link
Contributor

bleskes commented Nov 22, 2017

I have addressed your comments for #27268 and #27367. Would you mind taking another look?

Sure.

Yes, for a replica, we should open with a proper commit and delete violated commits. However, for a primary we may want to open an engine with the last commit to minimize the number of replaying operations.

I don't think the extra operation replay is a big concern - remember that most the times the last commit is good. I like the simplicity of the just doing this in the deletion policy and not making the engine more complex.

@dnhatn
Copy link
Member Author

dnhatn commented Nov 22, 2017

I like the simplicity of the just doing this in the deletion policy and not making the engine more complex.

I agreed. I am closing this as the approach is not good. Thanks @bleskes.

@dnhatn dnhatn closed this Nov 22, 2017
@dnhatn dnhatn deleted the start-prev-commit branch November 22, 2017 14:41
@clintongormley clintongormley added :Distributed/Engine Anything around managing Lucene and the Translog in an open shard. and removed :Sequence IDs labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed/Engine Anything around managing Lucene and the Translog in an open shard. :Distributed/Recovery Anything around constructing a new shard, either from a local or a remote source. WIP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants