Skip to content

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 jasontedor and s1monw 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