aboutsummaryrefslogtreecommitdiff
path: root/weed/util/chunk_cache
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-08-18 17:04:28 -0700
committerChris Lu <chris.lu@gmail.com>2020-08-18 17:04:28 -0700
commit6a92f0bc7a2cbf0828c720422220b600263b5217 (patch)
tree76088bd0bfb74ef03eeba87b46e48a5a0915ca9f /weed/util/chunk_cache
parent618b2f6829af2bbf8cfed3a543ee13f675bd8efd (diff)
downloadseaweedfs-6a92f0bc7a2cbf0828c720422220b600263b5217.tar.xz
seaweedfs-6a92f0bc7a2cbf0828c720422220b600263b5217.zip
refactoring to typed Size
Go is amazing with refactoring!
Diffstat (limited to 'weed/util/chunk_cache')
-rw-r--r--weed/util/chunk_cache/chunk_cache_on_disk.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/util/chunk_cache/chunk_cache_on_disk.go b/weed/util/chunk_cache/chunk_cache_on_disk.go
index d74f87b0c..4009d2309 100644
--- a/weed/util/chunk_cache/chunk_cache_on_disk.go
+++ b/weed/util/chunk_cache/chunk_cache_on_disk.go
@@ -137,7 +137,7 @@ func (v *ChunkCacheVolume) WriteNeedle(key types.NeedleId, data []byte) error {
v.fileSize += int64(types.NeedlePaddingSize - extraSize)
}
- if err := v.nm.Put(key, types.ToOffset(offset), uint32(len(data))); err != nil {
+ if err := v.nm.Put(key, types.ToOffset(offset), types.Size(len(data))); err != nil {
return err
}