Skip to content

Renew retention leases while following#39335

Merged
jasontedor merged 12 commits intoelastic:masterfrom
jasontedor:ccr-retention-lease-renewal-while-following
Feb 25, 2019
Merged

Renew retention leases while following#39335
jasontedor merged 12 commits intoelastic:masterfrom
jasontedor:ccr-retention-lease-renewal-while-following

Conversation

@jasontedor
Copy link
Copy Markdown
Member

This commit is the final piece of the integration of CCR with retention leases. Namely, we periodically renew retention leases and advance the retaining sequence number while following.

Relates #37165
Closes #38718

This commit is the final piece of the integration of CCR with retention
leases. Namely, we periodically renew retention leases and advance the
retaining sequence number while following.
@jasontedor jasontedor added v7.0.0 :Distributed/CCR Issues around the Cross Cluster State Replication features v6.7.0 v8.0.0 v7.2.0 labels Feb 23, 2019
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-distributed

@jasontedor jasontedor mentioned this pull request Feb 23, 2019
24 tasks
Copy link
Copy Markdown
Member

@dnhatn dnhatn left a comment

Choose a reason for hiding this comment

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

I left a question and two small nits but this looks really good. Thanks @jasontedor.

* lease back. After that listener returns, we can check to see if a retention lease exists on the leader.
*
* Note, this done mean that listener will fire twice, once in our onResponseReceived hook, and once after our onResponseReceived
* callback returns. 🤷‍♀️
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@tbrooks8 Is there a better way?

Copy link
Copy Markdown
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

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

LGTM - Great to see the last piece of the machinery being added!

});

synchronized (this) {
renewable = scheduleBackgroundRetentionLeaseRenewal(() -> {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can this code be placed under the existing synchronized block in the start() method?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I pushed a commit that does this.

@jasontedor jasontedor merged commit 176c157 into elastic:master Feb 25, 2019
jasontedor added a commit that referenced this pull request Feb 25, 2019
This commit is the final piece of the integration of CCR with retention
leases. Namely, we periodically renew retention leases and advance the
retaining sequence number while following.
jasontedor added a commit that referenced this pull request Feb 25, 2019
This commit is the final piece of the integration of CCR with retention
leases. Namely, we periodically renew retention leases and advance the
retaining sequence number while following.
jasontedor added a commit that referenced this pull request Feb 25, 2019
This commit is the final piece of the integration of CCR with retention
leases. Namely, we periodically renew retention leases and advance the
retaining sequence number while following.
@jasontedor jasontedor deleted the ccr-retention-lease-renewal-while-following branch February 26, 2019 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed/CCR Issues around the Cross Cluster State Replication features >enhancement v6.7.0 v7.0.0-rc1 v7.2.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prevent CCR followers from falling fatally far behind

7 participants