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

Support limiting number of cache items #5489

Merged
merged 2 commits into from
Jan 2, 2025

Conversation

polyrabbit
Copy link
Contributor

As suggested in #5478 - to avoid inode usage confilicts when multiple volumes are scheduled to the same host.

@polyrabbit polyrabbit force-pushed the limit-cache-items branch 5 times, most recently from 6a46d09 to f656ccd Compare January 1, 2025 02:56
Copy link

codecov bot commented Jan 1, 2025

Codecov Report

Attention: Patch coverage is 73.80952% with 11 lines in your changes missing coverage. Please review.

Project coverage is 55.01%. Comparing base (beaa0d0) to head (76961e6).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
pkg/chunk/disk_cache.go 66.66% 4 Missing and 3 partials ⚠️
pkg/chunk/mem_cache.go 60.00% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5489      +/-   ##
==========================================
- Coverage   55.09%   55.01%   -0.08%     
==========================================
  Files         166      165       -1     
  Lines       47787    47705      -82     
==========================================
- Hits        26327    26247      -80     
+ Misses      18613    18611       -2     
  Partials     2847     2847              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -650,6 +651,10 @@ func (c *Config) parseHours() (start, end int, err error) {
return
}

func (c *Config) CacheEnabled() bool {
return c.CacheSize > 0 && c.CacheItems > 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CacheItems could be 0 for unlimited, we can only check CacheSize

cmd/flags.go Outdated Show resolved Hide resolved
@polyrabbit polyrabbit force-pushed the limit-cache-items branch 3 times, most recently from 68827a1 to a62e17a Compare January 2, 2025 05:14
@davies davies merged commit cd1c126 into juicedata:main Jan 2, 2025
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants