Skip to content

Commit

Permalink
lease: Clean-up old TODO around lease map and priority queue
Browse files Browse the repository at this point in the history
This TODO was addressed in etcd-io#9418.
  • Loading branch information
cosgroveb authored and braintreeps committed Jun 7, 2018
1 parent 1647164 commit fa8deae
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 fa8deae

Please sign in to comment.