diff --git a/server/lease/lessor.go b/server/lease/lessor.go index d1599d60ebc..78ed1472edd 100644 --- a/server/lease/lessor.go +++ b/server/lease/lessor.go @@ -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)