aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorguosj <515878133@qq.com>2022-02-23 16:21:25 +0800
committerguosj <515878133@qq.com>2022-02-23 16:21:25 +0800
commitd68c27f82d589e8b46136fa005bf3cd9c5f4e969 (patch)
tree51235d7c1d90c85eb9b1a0189a763ef2fade4fef
parent8f9aa0cddd4c65b084f054d14128791109ec9fda (diff)
downloadseaweedfs-d68c27f82d589e8b46136fa005bf3cd9c5f4e969.tar.xz
seaweedfs-d68c27f82d589e8b46136fa005bf3cd9c5f4e969.zip
fix another return value bug
-rw-r--r--weed/storage/volume_vacuum.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/storage/volume_vacuum.go b/weed/storage/volume_vacuum.go
index 288f2a565..3bda260d9 100644
--- a/weed/storage/volume_vacuum.go
+++ b/weed/storage/volume_vacuum.go
@@ -399,7 +399,7 @@ func copyDataBasedOnIndexFile(srcDatName, srcIdxName, dstDatName, datIdxName str
dataFile *os.File
)
if dstDatBackend, err = backend.CreateVolumeFile(dstDatName, preallocate, 0); err != nil {
- return
+ return err
}
defer dstDatBackend.Close()
@@ -408,7 +408,7 @@ func copyDataBasedOnIndexFile(srcDatName, srcIdxName, dstDatName, datIdxName str
newNm := needle_map.NewMemDb()
defer newNm.Close()
if err = oldNm.LoadFromIdx(srcIdxName); err != nil {
- return
+ return err
}
if dataFile, err = os.Open(srcDatName); err != nil {
return err
@@ -464,5 +464,5 @@ func copyDataBasedOnIndexFile(srcDatName, srcIdxName, dstDatName, datIdxName str
newNm.SaveToIdx(datIdxName)
- return
+ return nil
}