-
Notifications
You must be signed in to change notification settings - Fork 254
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
Disable DV GC by default #2754
Disable DV GC by default #2754
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1211,8 +1211,9 @@ func IsErrCacheNotStarted(err error) bool { | |
} | ||
|
||
// GetDataVolumeTTLSeconds gets the current DataVolume TTL in seconds if GC is enabled, or < 0 if GC is disabled | ||
// Garbage collection is disabled by default | ||
func GetDataVolumeTTLSeconds(config *cdiv1.CDIConfig) int32 { | ||
const defaultDataVolumeTTLSeconds = 0 | ||
const defaultDataVolumeTTLSeconds = -1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe a comment here that GC is disabled by default? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. added |
||
if config.Spec.DataVolumeTTLSeconds != nil { | ||
return *config.Spec.DataVolumeTTLSeconds | ||
} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Maybe worth a comment as well, similar to
const defaultDataVolumeTTLSeconds = -1
as these are the GC defaulting points
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.
added