Browse Source

Merge pull request #2698 from guo-sj/fix_bugs_in_return_value

pull/2700/head
Chris Lu 3 years ago
committed by GitHub
parent
commit
da58c748bc
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      weed/storage/volume_vacuum.go

6
weed/storage/volume_vacuum.go

@ -399,7 +399,7 @@ func copyDataBasedOnIndexFile(srcDatName, srcIdxName, dstDatName, datIdxName str
dataFile *os.File dataFile *os.File
) )
if dstDatBackend, err = backend.CreateVolumeFile(dstDatName, preallocate, 0); err != nil { if dstDatBackend, err = backend.CreateVolumeFile(dstDatName, preallocate, 0); err != nil {
return
return err
} }
defer dstDatBackend.Close() defer dstDatBackend.Close()
@ -408,7 +408,7 @@ func copyDataBasedOnIndexFile(srcDatName, srcIdxName, dstDatName, datIdxName str
newNm := needle_map.NewMemDb() newNm := needle_map.NewMemDb()
defer newNm.Close() defer newNm.Close()
if err = oldNm.LoadFromIdx(srcIdxName); err != nil { if err = oldNm.LoadFromIdx(srcIdxName); err != nil {
return
return err
} }
if dataFile, err = os.Open(srcDatName); err != nil { if dataFile, err = os.Open(srcDatName); err != nil {
return err return err
@ -464,5 +464,5 @@ func copyDataBasedOnIndexFile(srcDatName, srcIdxName, dstDatName, datIdxName str
newNm.SaveToIdx(datIdxName) newNm.SaveToIdx(datIdxName)
return
return nil
} }
Loading…
Cancel
Save