mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-01-18 22:43:41 +08:00
filer: emit metadata notification correctly for batch deletion
This commit is contained in:
parent
1dd2c76532
commit
4eecc6abc6
@ -74,9 +74,9 @@ func (f *Filer) doBatchDeleteFolderMetaAndData(ctx context.Context, entry *Entry
|
|||||||
if sub.IsDirectory() {
|
if sub.IsDirectory() {
|
||||||
dirChunks, err = f.doBatchDeleteFolderMetaAndData(ctx, sub, isRecursive, ignoreRecursiveError, shouldDeleteChunks, false)
|
dirChunks, err = f.doBatchDeleteFolderMetaAndData(ctx, sub, isRecursive, ignoreRecursiveError, shouldDeleteChunks, false)
|
||||||
f.cacheDelDirectory(string(sub.FullPath))
|
f.cacheDelDirectory(string(sub.FullPath))
|
||||||
f.NotifyUpdateEvent(ctx, sub, nil, shouldDeleteChunks, isFromOtherCluster)
|
|
||||||
chunks = append(chunks, dirChunks...)
|
chunks = append(chunks, dirChunks...)
|
||||||
} else {
|
} else {
|
||||||
|
f.NotifyUpdateEvent(ctx, sub, nil, shouldDeleteChunks, isFromOtherCluster)
|
||||||
chunks = append(chunks, sub.Chunks...)
|
chunks = append(chunks, sub.Chunks...)
|
||||||
}
|
}
|
||||||
if err != nil && !ignoreRecursiveError {
|
if err != nil && !ignoreRecursiveError {
|
||||||
@ -95,6 +95,8 @@ func (f *Filer) doBatchDeleteFolderMetaAndData(ctx context.Context, entry *Entry
|
|||||||
return nil, fmt.Errorf("filer store delete: %v", storeDeletionErr)
|
return nil, fmt.Errorf("filer store delete: %v", storeDeletionErr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
f.NotifyUpdateEvent(ctx, entry, nil, shouldDeleteChunks, isFromOtherCluster)
|
||||||
|
|
||||||
return chunks, nil
|
return chunks, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,8 +109,9 @@ func (f *Filer) doDeleteEntryMetaAndData(ctx context.Context, entry *Entry, shou
|
|||||||
}
|
}
|
||||||
if entry.IsDirectory() {
|
if entry.IsDirectory() {
|
||||||
f.cacheDelDirectory(string(entry.FullPath))
|
f.cacheDelDirectory(string(entry.FullPath))
|
||||||
|
} else {
|
||||||
|
f.NotifyUpdateEvent(ctx, entry, nil, shouldDeleteChunks, isFromOtherCluster)
|
||||||
}
|
}
|
||||||
f.NotifyUpdateEvent(ctx, entry, nil, shouldDeleteChunks, isFromOtherCluster)
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user