-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
Lease checkpoints fix #13491
Lease checkpoints fix #13491
Changes from all commits
f5a0aa3
4b38a68
796b344
c5eb78e
3307d0d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -446,6 +446,7 @@ func (le *lessor) Promote(extend time.Duration) { | |
l.refresh(extend) | ||
item := &LeaseWithTime{id: l.ID, time: l.expiry} | ||
le.leaseExpiredNotifier.RegisterOrUpdate(item) | ||
le.scheduleCheckpointIfNeeded(l) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Found that commenting out this line doesn't break the tests. Can you add a test for this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. I wonder why `le.scheduleCheckpointIfNeeded(l)' in line 487 is not handling this case. |
||
} | ||
|
||
if len(le.leaseMap) < leaseRevokeRate { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes checkpoints depend whether there was a checkpoint since last snapshot. I think we should consider persisting remainingTTL from checkpoints into backend.