mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-24 06:50:40 +02:00
avoid data race read fileChunksSize (#3570)
https://github.com/seaweedfs/seaweedfs/issues/3557
This commit is contained in:
1 parent
86a5b6183d
commit
90d55cd179
1 file changed
+2
-1
@@ -118,8 +118,9 @@ func (fs *FilerServer) uploadReaderToChunks(w http.ResponseWriter, r *http.Reque
|
||||
if chunk != nil {
|
||||
fileChunksLock.Lock()
|
||||
fileChunks = append(fileChunks, chunk)
|
||||
fileChunksSize := len(fileChunks)
|
||||
fileChunksLock.Unlock()
|
||||
glog.V(4).Infof("uploaded %s chunk %d to %s [%d,%d)", fileName, len(fileChunks), chunk.FileId, offset, offset+int64(chunk.Size))
|
||||
glog.V(4).Infof("uploaded %s chunk %d to %s [%d,%d)", fileName, fileChunksSize, chunk.FileId, offset, offset+int64(chunk.Size))
|
||||
}
|
||||
}(chunkOffset)
|
||||
|
||||
|
||||
Reference in new issue
Block a user