Renew retention leases while following#39335
Merged
jasontedor merged 12 commits intoelastic:masterfrom Feb 25, 2019
Merged
Conversation
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.
Collaborator
|
Pinging @elastic/es-distributed |
24 tasks
dnhatn
approved these changes
Feb 24, 2019
Member
dnhatn
left a comment
There was a problem hiding this comment.
I left a question and two small nits but this looks really good. Thanks @jasontedor.
x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/ShardFollowNodeTask.java
Outdated
Show resolved
Hide resolved
...ck/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/ShardFollowTasksExecutor.java
Show resolved
Hide resolved
...ck/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/ShardFollowTasksExecutor.java
Show resolved
Hide resolved
jasontedor
commented
Feb 24, 2019
| * 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. 🤷♀️ |
Member
Author
There was a problem hiding this comment.
@tbrooks8 Is there a better way?
martijnvg
approved these changes
Feb 25, 2019
Member
martijnvg
left a comment
There was a problem hiding this comment.
LGTM - Great to see the last piece of the machinery being added!
| }); | ||
|
|
||
| synchronized (this) { | ||
| renewable = scheduleBackgroundRetentionLeaseRenewal(() -> { |
Member
There was a problem hiding this comment.
Can this code be placed under the existing synchronized block in the start() method?
Member
Author
There was a problem hiding this comment.
I pushed a commit that does this.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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