diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2022-02-23 00:30:52 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-23 00:30:52 -0800 |
| commit | bd092d8318bc8f474dd117e1ce0e49e764eb0f01 (patch) | |
| tree | 70ab0b5ae3d450bc8c39cad1f1233321c476c063 | |
| parent | 8b806fb2739a5981474b420db00b35f60b6f45ef (diff) | |
| parent | 8f9aa0cddd4c65b084f054d14128791109ec9fda (diff) | |
| download | seaweedfs-bd092d8318bc8f474dd117e1ce0e49e764eb0f01.tar.xz seaweedfs-bd092d8318bc8f474dd117e1ce0e49e764eb0f01.zip | |
Merge pull request #2697 from guo-sj/fix_bugs_in_return_value
| -rw-r--r-- | weed/storage/volume_vacuum.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/storage/volume_vacuum.go b/weed/storage/volume_vacuum.go index 56e8beddb..288f2a565 100644 --- a/weed/storage/volume_vacuum.go +++ b/weed/storage/volume_vacuum.go @@ -370,7 +370,7 @@ func (v *Volume) copyDataAndGenerateIndexFile(dstName, idxName string, prealloca dst backend.BackendStorageFile ) if dst, err = backend.CreateVolumeFile(dstName, preallocate, 0); err != nil { - return + return err } defer dst.Close() @@ -386,11 +386,11 @@ func (v *Volume) copyDataAndGenerateIndexFile(dstName, idxName string, prealloca } err = ScanVolumeFile(v.dir, v.Collection, v.Id, v.needleMapKind, scanner) if err != nil { - return nil + return err } err = nm.SaveToIdx(idxName) - return + return nil } func copyDataBasedOnIndexFile(srcDatName, srcIdxName, dstDatName, datIdxName string, sb super_block.SuperBlock, version needle.Version, preallocate, compactionBytePerSecond int64, progressFn ProgressFunc) (err error) { |
