aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-04-12 03:34:36 -0700
committerChris Lu <chris.lu@gmail.com>2020-04-12 03:34:36 -0700
commit94e35cdb3552498b25824950bde94334c8b25331 (patch)
treeb0d97ddbe50ad79023386a8a5da24a209d7a0ce4
parent1c2e920fa2831d871ec55fed04818fddaaaacbd5 (diff)
downloadseaweedfs-94e35cdb3552498b25824950bde94334c8b25331.tar.xz
seaweedfs-94e35cdb3552498b25824950bde94334c8b25331.zip
mount: fix
fix bug found by git bisect, but I do not understand why it can cause error!
-rw-r--r--weed/util/chunk_cache/chunk_cache.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/weed/util/chunk_cache/chunk_cache.go b/weed/util/chunk_cache/chunk_cache.go
index 48e4bfb0d..9f2a0518f 100644
--- a/weed/util/chunk_cache/chunk_cache.go
+++ b/weed/util/chunk_cache/chunk_cache.go
@@ -90,9 +90,7 @@ func (c *ChunkCache) SetChunk(fileId string, data []byte) {
c.Lock()
defer c.Unlock()
- if existingData := c.doGetChunk(fileId); len(existingData)==0{
- c.doSetChunk(fileId, data)
- }
+ c.doSetChunk(fileId, data)
}
func (c *ChunkCache) doSetChunk(fileId string, data []byte) {