-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Implementation of the new v2 garbage collector #8621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
6cd4f07
Create a maximum revision GC setting
whaught c08705a
update yaml
whaught c6fc366
Use the new GC settings
whaught d09b112
Merge remote-tracking branch 'upstream/master' into use-gc-settings
whaught 0a65256
actually use the new settings
whaught aab20cf
simplify
whaught 2a7afbb
now it compiles
whaught 3aebf24
Merge remote-tracking branch 'upstream/master' into use-gc-settings
whaught 16d6668
fix config references
whaught 562512a
test with min settings
whaught 639a4fc
max tests
whaught b2969c6
Merge remote-tracking branch 'upstream/master' into use-gc-settings
whaught 668dd00
change name of max to max-non-active
whaught 80d7b90
comments and validate positive
whaught ab2ea1c
parse forever constant
whaught 6066241
fixing the unit test, better examples
whaught e3343a2
include disabled setinel
whaught 2c1334f
merge in settings
whaught 4393e7e
Merge remote-tracking branch 'upstream/master' into use-gc-settings
whaught 2ac77b3
disabled logic
whaught a3da2ff
update comments
whaught 53302c5
review suggestions
whaught 0259af4
fix const
whaught 9f8da0f
update with logging changes
whaught 645743f
Merge remote-tracking branch 'upstream/master' into use-gc-settings
whaught 70d3b34
fix unit test
whaught c838773
comment settings
whaught e4e0d7a
unit test update
whaught b3b262a
Merge remote-tracking branch 'upstream/master' into use-gc-settings
whaught 65aad63
nits
whaught de048b5
fix unit test names
whaught d7297ec
more consistent name
whaught e994502
fix max boundary
whaught b1d34df
nit
whaught 5f1fc4c
remove ref to lastpinned
whaught 220ca35
Merge remote-tracking branch 'upstream/master' into use-gc-settings
whaught 0085ef8
review suggestions
whaught ec96b4b
fix sign
whaught 4331669
use nonactive as min
whaught f29b422
first filter out active
whaught f0264d7
comment nit on config
whaught 5a7c70b
swap if/else ordering
whaught 345e7ec
simplify
whaught 0204045
whitespace
whaught File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I wonder if we should tweak the name of
MinNonActiveRevisionsandMaxNonActiveRevisionsconfig options for more clarityserving/pkg/gc/config.go
Lines 58 to 63 in d86ab4a
Since depending on how the revisions are processes you'd get different gc results
For example (with min 20 & max 1000):
A list composed of 20 stale revisions and then 100 non-active would cause all non-active revisions to be deleted
compared to
A list composed of 100 non-active revisions and then 20 stale revisions would delete nothing
Unsure what we want
Uh oh!
There was an error while loading. Please reload this page.
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.
I think I've documented that better here:
serving/config/core/configmaps/gc.yaml
Line 59 in da8105f
and need to carry that across to the golang comment. Note that all stale revisions are also non-active. In your example I think we'd expect 20 to be deleted and the remaining to stick around until they also go stale. However if you disable the time bounds for staleness, we keep growing the revision list to the max. That allows you to either have a hard-count of how many we keep around or a less deterministic time-based approach that can still have a ceiling. Or disable everything!
Uh oh!
There was an error while loading. Please reload this page.
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.
I think I misunderstood what you were saying. The former scenario would be unexpected because the revisions are first sorted by their last active time, but we do want the latter scenario to delete the 20 stale revisions.
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.
I've updated the code to consider the latter scenario regardless of the sort assumption. I think it's a little more readable too.