Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

re-enable caching larger than 16MB

Chris Lu707936f48218
diff --git a/weed/util/chunk_cache/chunk_cache.go b/weed/util/chunk_cache/chunk_cache.go
index 608d605b12..3615aee0e1 100644
--- a/weed/util/chunk_cache/chunk_cache.go
+++ b/weed/util/chunk_cache/chunk_cache.go
@@ -76,7 +76,7 @@ func (c *TieredChunkCache) doGetChunk(fileId string, minSize uint64) (data []byt
return data
}
}
- if minSize <= c.onDiskCacheSizeLimit2 {
+ {
data = c.diskCaches[2].getChunk(fid.Key)
if len(data) >= int(minSize) {
return data
@@ -115,7 +115,7 @@ func (c *TieredChunkCache) doSetChunk(fileId string, data []byte) {
c.diskCaches[0].setChunk(fid.Key, data)
} else if len(data) <= int(c.onDiskCacheSizeLimit1) {
c.diskCaches[1].setChunk(fid.Key, data)
- } else if len(data) <= int(c.onDiskCacheSizeLimit2) {
+ } else {
c.diskCaches[2].setChunk(fid.Key, data)
}