Skip to content

Commit

Permalink
Merge pull request #9649 from cosgroveb/cleanup_lease_queue_todo
Browse files Browse the repository at this point in the history
lease: Clean-up old TODO around lease map and priority queue
  • Loading branch information
xiang90 authored Apr 27, 2018
2 parents 02e2e3d + 13ed9f3 commit 5fca0ec
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions lease/lessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,6 @@ type lessor struct {
// demotec will be closed if the lessor is demoted.
demotec chan struct{}

// TODO: probably this should be a heap with a secondary
// id index.
// Now it is O(N) to loop over the leases to find expired ones.
// We want to make Grant, Revoke, and findExpiredLeases all O(logN) and
// Renew O(1).
// findExpiredLeases and Renew should be the most frequent operations.
leaseMap map[LeaseID]*Lease
leaseHeap LeaseQueue
itemMap map[LeaseItem]LeaseID
Expand Down

0 comments on commit 5fca0ec

Please sign in to comment.