Skip to content

Commit

Permalink
Merge pull request #14078 from ahrtr/checkpoint_reset
Browse files Browse the repository at this point in the history
Clean up the local variable cps so that it will not continue to schedule checkpoint
  • Loading branch information
ahrtr authored May 30, 2022
2 parents ce77d83 + 1d482bf commit 08f4c34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/lease/lessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -646,10 +646,10 @@ func (le *lessor) revokeExpiredLeases() {
// checkpointScheduledLeases finds all scheduled lease checkpoints that are due and
// submits them to the checkpointer to persist them to the consensus log.
func (le *lessor) checkpointScheduledLeases() {
var cps []*pb.LeaseCheckpoint

// rate limit
for i := 0; i < leaseCheckpointRate/2; i++ {
var cps []*pb.LeaseCheckpoint

le.mu.Lock()
if le.isPrimary() {
cps = le.findDueScheduledCheckpoints(maxLeaseCheckpointBatchSize)
Expand Down

0 comments on commit 08f4c34

Please sign in to comment.