mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-01-18 14:41:31 +08:00
refactor
This commit is contained in:
parent
513bcd6e0d
commit
effa00ed08
@ -317,11 +317,3 @@ func (f *Filer) Shutdown() {
|
|||||||
f.LocalMetaLogBuffer.Shutdown()
|
f.LocalMetaLogBuffer.Shutdown()
|
||||||
f.Store.Shutdown()
|
f.Store.Shutdown()
|
||||||
}
|
}
|
||||||
|
|
||||||
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)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package filer
|
package filer
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -151,3 +152,11 @@ 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…
Reference in New Issue
Block a user