Improved lease management#2474
Conversation
Allow setting an expiration label to have the garbage collector remove an item after the specified time. Signed-off-by: Derek McGowan <[email protected]>
|
LGTM I feel like using a label for lease expiry is a little weird. Can we change that in a backwards compatible way or is that even worth it? |
Add leases manager to the leases package and use the interface on the client and service. Signed-off-by: Derek McGowan <[email protected]>
Signed-off-by: Derek McGowan <[email protected]>
Signed-off-by: Derek McGowan <[email protected]>
Signed-off-by: Derek McGowan <[email protected]>
462cea9 to
29b72d4
Compare
Codecov Report
@@ Coverage Diff @@
## master #2474 +/- ##
=========================================
+ Coverage 44.76% 44.8% +0.04%
=========================================
Files 92 92
Lines 9483 9534 +51
=========================================
+ Hits 4245 4272 +27
- Misses 4555 4572 +17
- Partials 683 690 +7
Continue to review full report at Codecov.
|
It is consistent with our other option GC related flags. We can always move labels to first class fields in the future if we see value in it, I don't right now. I mostly want to avoid API changes here, although I will probably add another one for sync delete anyway. |
|
LGTM |
Currently leases are not tracked very easily. If a client crashes or loses reference to a lease there is currently no good way to see those leases and clean them up. This change provides a better interface for managing those leases and updates the default lease behavior from client to expire after 24 hours.
A few different changes here that seemed to make sense to come together...
ctr leasessubcommand for creating, listing, and removing leasesA few more follow ups to come for this
closes #2093