mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
[mount] fix metacache update (#4161)
This commit is contained in:
parent
b63d1e9c6b
commit
de081c0d64
|
@ -70,8 +70,12 @@ func (mc *MetaCache) AtomicUpdateEntryFromFiler(ctx context.Context, oldPath uti
|
||||||
//mc.Lock()
|
//mc.Lock()
|
||||||
//defer mc.Unlock()
|
//defer mc.Unlock()
|
||||||
|
|
||||||
oldDir, _ := oldPath.DirAndName()
|
entry, err := mc.FindEntry(ctx, oldPath)
|
||||||
if mc.isCachedFn(util.FullPath(oldDir)) {
|
if err != nil && err != filer_pb.ErrNotFound {
|
||||||
|
glog.Errorf("Metacache: find entry error: %v", err)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if entry != nil {
|
||||||
if oldPath != "" {
|
if oldPath != "" {
|
||||||
if newEntry != nil && oldPath == newEntry.FullPath {
|
if newEntry != nil && oldPath == newEntry.FullPath {
|
||||||
// skip the unnecessary deletion
|
// skip the unnecessary deletion
|
||||||
|
|
Loading…
Reference in a new issue