Browse Source

fix pre allocated volume size

pull/1502/head
Chris Lu 4 years ago
parent
commit
e43d86c796
  1. 2
      weed/util/chunk_cache/on_disk_cache_layer.go

2
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 {

Loading…
Cancel
Save