From e43d86c79600ee09ef9bc5b271758bea662c0ca9 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 27 Sep 2020 10:58:19 -0700 Subject: [PATCH] fix pre allocated volume size --- weed/util/chunk_cache/on_disk_cache_layer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/util/chunk_cache/on_disk_cache_layer.go b/weed/util/chunk_cache/on_disk_cache_layer.go index a4d786510..eebd89798 100644 --- a/weed/util/chunk_cache/on_disk_cache_layer.go +++ b/weed/util/chunk_cache/on_disk_cache_layer.go @@ -24,7 +24,7 @@ func NewOnDiskCacheLayer(dir, namePrefix string, diskSize int64, segmentCount in c := &OnDiskCacheLayer{} for i := 0; i < volumeCount; i++ { fileName := path.Join(dir, fmt.Sprintf("%s_%d", namePrefix, i)) - diskCache, err := LoadOrCreateChunkCacheVolume(fileName, volumeSize*1024*1024) + diskCache, err := LoadOrCreateChunkCacheVolume(fileName, volumeSize) if err != nil { glog.Errorf("failed to add cache %s : %v", fileName, err) } else {