aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-05-15 09:37:39 -0700
committerChris Lu <chris.lu@gmail.com>2021-05-15 09:37:39 -0700
commit1aa7e99a899bd0b22c00fb8128c381b7406f75eb (patch)
treed2382f71f4daef035f3f1c092c1a654c433d03f1
parent45a762223afc320da6dc19fd484f28db19ee8536 (diff)
downloadseaweedfs-1aa7e99a899bd0b22c00fb8128c381b7406f75eb.tar.xz
seaweedfs-1aa7e99a899bd0b22c00fb8128c381b7406f75eb.zip
skip file not found error when deleting
-rw-r--r--weed/storage/volume_vacuum.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/storage/volume_vacuum.go b/weed/storage/volume_vacuum.go
index be84f8a13..067456dfa 100644
--- a/weed/storage/volume_vacuum.go
+++ b/weed/storage/volume_vacuum.go
@@ -158,10 +158,10 @@ func (v *Volume) cleanupCompact() error {
e1 := os.Remove(v.FileName(".cpd"))
e2 := os.Remove(v.FileName(".cpx"))
- if e1 != nil {
+ if e1 != nil && !os.IsNotExist(e1) {
return e1
}
- if e2 != nil {
+ if e2 != nil && !os.IsNotExist(e2) {
return e2
}
return nil