-
Notifications
You must be signed in to change notification settings - Fork 80
add revisions garbage collection mechanism #159
Conversation
erdun
commented
Aug 2, 2020
•
edited by wonderflow
Loading
edited by wonderflow
- add revisions garbage collection mechanism, default revision limit is 50.
- revision in use won't be deleted
72bc7bf
to
ace7cd5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR adds a mechanism about auto deleting ControllerRevision, it deserves us to add some documentation for it as users will care about this mechanism. Please add one, thanks!
Signed-off-by: erdun <[email protected]>
Signed-off-by: erdun <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, ping @ryanzhang-oss
LGTM |
} | ||
} | ||
|
||
toKeep := revisionLimit + len(liveHashes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is toKeep used other than immediately below?
continue | ||
} | ||
// Clean up | ||
revisionToClean := revision |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same, why creating another variable?