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

File-based recovery with soft-deletes should send only operations after the local checkpoint #33190

Merged
merged 4 commits into from
Aug 28, 2018

Conversation

dnhatn
Copy link
Member

@dnhatn dnhatn commented Aug 28, 2018

Today a file-based recovery will replay all existing translog operations from the primary on a replica so that that replica can have a full history in translog as the primary. However, with soft-deletes enabled, we should not do it because:

  1. All operations before the local checkpoint of the safe commit exist in the commit already.

  2. The number of operations before the local checkpoint may be considerable and requires a significant amount of time to replay on a replica.

Relates #30522
Relates #29530

/cc @bleskes

Today a file-based recovery will replay  all existing translog operations from
the primary on a replica so that that replica can have a full history in
translog as the primary. However, with soft-deletes enabled, we should not do
it because:

1. All operations before the local checkpoint of the safe commit exist in the
commit already.

2. The number of operations before the local checkpoint may be considerable and
requires a significant amount of time to replay on a replica.

Relates elastic#30522
Relates elastic#29530
@dnhatn dnhatn added >feature :Distributed Indexing/Recovery Anything around constructing a new shard, either from a local or a remote source. labels Aug 28, 2018
@dnhatn dnhatn requested review from s1monw and jasontedor August 28, 2018 01:18
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

@dnhatn dnhatn changed the title File-based with soft-deletes should send ops after checkpoint File-based recovery with soft-deletes should send only operations after the local checkpoint Aug 28, 2018
Copy link
Contributor

@s1monw s1monw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM make sense

Copy link
Member

@jasontedor jasontedor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@dnhatn
Copy link
Member Author

dnhatn commented Aug 28, 2018

Thanks @s1monw and @jasontedor.

@dnhatn dnhatn merged commit e39689a into elastic:ccr Aug 28, 2018
@dnhatn dnhatn deleted the send_ops_after_checkpoint branch August 28, 2018 16:32
dnhatn added a commit that referenced this pull request Aug 28, 2018
…es (#33190)

Today a file-based recovery will replay all existing translog operations
from the primary on a replica so that that replica can have a full
history in translog as the primary. However, with soft-deletes enabled,
we should not do it because:

1. All operations before the local checkpoint of the safe commit exist in
the commit already.

2. The number of operations before the local checkpoint may be considerable
and requires a significant amount of time to replay on a replica.

Relates #30522
Relates #29530
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Indexing/Recovery Anything around constructing a new shard, either from a local or a remote source. >feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants