Browse Source

refactor

pull/1650/head
Chris Lu 4 years ago
parent
commit
cc2bd97ad9
  1. 8
      weed/filer/filer_delete_entry.go
  2. 8
      weed/filer/filer_deletion.go

8
weed/filer/filer_delete_entry.go

@ -145,3 +145,11 @@ func (f *Filer) doDeleteCollection(collectionName string) (err error) {
}) })
} }
func (f *Filer) maybeDeleteHardLinks(hardLinkIds []HardLinkId) {
for _, hardLinkId := range hardLinkIds {
if err := f.Store.DeleteHardLink(context.Background(), hardLinkId); err != nil {
glog.Errorf("delete hard link id %d : %v", hardLinkId, err)
}
}
}

8
weed/filer/filer_deletion.go

@ -1,7 +1,6 @@
package filer package filer
import ( import (
"context"
"strings" "strings"
"time" "time"
@ -153,10 +152,3 @@ func (f *Filer) deleteChunksIfNotNew(oldEntry, newEntry *Entry) {
f.DeleteChunks(toDelete) f.DeleteChunks(toDelete)
} }
func (f *Filer) maybeDeleteHardLinks(hardLinkIds []HardLinkId) {
for _, hardLinkId := range hardLinkIds {
if err := f.Store.DeleteHardLink(context.Background(), hardLinkId); err != nil {
glog.Errorf("delete hard link id %d : %v", hardLinkId, err)
}
}
}
Loading…
Cancel
Save