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

Introduce retention leases version #38193

Merged
merged 5 commits into from
Feb 1, 2019

Conversation

jasontedor
Copy link
Member

Because concurrent sync requests from a primary to its replicas could be in flight, it can be the case that an older retention leases collection arrives and is processed on the replica after a newer retention leases collection has arrived and been processed. Without a defense, in this case the replica would overwrite the newer retention leases with the older retention leases. This commit addresses this issue by introducing a versioning scheme to retention leases. This versioning scheme is used to resolve out-of-order processing on the replica. We persist this version into Lucene and restore it on recovery. The encoding of retention leases is starting to get a little ugly. We can consider addressing this in a follow-up.

Relates #37951 (backport)

Because concurrent sync requests from a primary to its replicas could be
in flight, it can be the case that an older retention leases collection
arrives and is processed on the replica after a newer retention leases
collection has arrived and been processed. Without a defense, in this
case the replica would overwrite the newer retention leases with the
older retention leases. This commit addresses this issue by introducing
a versioning scheme to retention leases. This versioning scheme is used
to resolve out-of-order processing on the replica. We persist this
version into Lucene and restore it on recovery. The encoding of
retention leases is starting to get a little ugly. We can consider
addressing this in a follow-up.
@jasontedor jasontedor added the :Distributed Indexing/Distributed A catch all label for anything in the Distributed Area. Please avoid if you can. label Feb 1, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

…ion-6.x

* elastic/6.x:
  fix compilation error
  Don't load global ordinals with the `map` execution_hint (elastic#38158)
@jasontedor jasontedor merged commit 13cc7f1 into elastic:6.x Feb 1, 2019
@jasontedor jasontedor deleted the retention-leases-version-6.x branch February 1, 2019 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport :Distributed Indexing/Distributed A catch all label for anything in the Distributed Area. Please avoid if you can.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants