|
|
@ -2,13 +2,14 @@ package filer |
|
|
|
|
|
|
|
import ( |
|
|
|
"context" |
|
|
|
"github.com/seaweedfs/seaweedfs/weed/glog" |
|
|
|
"github.com/viant/ptrie" |
|
|
|
"io" |
|
|
|
"math" |
|
|
|
"strings" |
|
|
|
"time" |
|
|
|
|
|
|
|
"github.com/seaweedfs/seaweedfs/weed/glog" |
|
|
|
"github.com/viant/ptrie" |
|
|
|
|
|
|
|
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb" |
|
|
|
"github.com/seaweedfs/seaweedfs/weed/stats" |
|
|
|
"github.com/seaweedfs/seaweedfs/weed/util" |
|
|
@ -186,11 +187,14 @@ func (fsw *FilerStoreWrapper) DeleteEntry(ctx context.Context, fp util.FullPath) |
|
|
|
} |
|
|
|
if len(existingEntry.HardLinkId) != 0 { |
|
|
|
// remove hard link
|
|
|
|
op := ctx.Value("OP") |
|
|
|
if op != "MV" { |
|
|
|
glog.V(4).Infof("DeleteHardLink %s", existingEntry.FullPath) |
|
|
|
if err = fsw.DeleteHardLink(ctx, existingEntry.HardLinkId); err != nil { |
|
|
|
return err |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// glog.V(4).Infof("DeleteEntry %s", fp)
|
|
|
|
return actualStore.DeleteEntry(ctx, fp) |
|
|
@ -206,11 +210,14 @@ func (fsw *FilerStoreWrapper) DeleteOneEntry(ctx context.Context, existingEntry |
|
|
|
|
|
|
|
if len(existingEntry.HardLinkId) != 0 { |
|
|
|
// remove hard link
|
|
|
|
op := ctx.Value("OP") |
|
|
|
if op != "MV" { |
|
|
|
glog.V(4).Infof("DeleteHardLink %s", existingEntry.FullPath) |
|
|
|
if err = fsw.DeleteHardLink(ctx, existingEntry.HardLinkId); err != nil { |
|
|
|
return err |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// glog.V(4).Infof("DeleteOneEntry %s", existingEntry.FullPath)
|
|
|
|
return actualStore.DeleteEntry(ctx, existingEntry.FullPath) |
|
|
|