Skip to content
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

fix(general): change cache full logging frequency & message #3193

Merged
merged 2 commits into from Aug 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions internal/cache/persistent_lru_cache.go
Expand Up @@ -233,10 +233,10 @@
// snapshots/restores from getting affected by the cache's storage use.
if c.isCacheFullLocked() {
// Limit warnings to one per minute max.
if clock.Now().Sub(c.lastCacheWarning) > time.Minute {
if clock.Now().Sub(c.lastCacheWarning) > 10*time.Minute {

Check warning on line 236 in internal/cache/persistent_lru_cache.go

View check run for this annotation

Codecov / codecov/patch

internal/cache/persistent_lru_cache.go#L236

Added line #L236 was not covered by tests
c.lastCacheWarning = clock.Now()

log(ctx).Warnf("Cache is full, unable to add %v into cache.", key)
log(ctx).Warnf("Cache is full, unable to add item into '%s' cache.", c.description)

Check warning on line 239 in internal/cache/persistent_lru_cache.go

View check run for this annotation

Codecov / codecov/patch

internal/cache/persistent_lru_cache.go#L239

Added line #L239 was not covered by tests
}

return
Expand Down