proper deletion ordering

delete central file store first, then delete local cache
This commit is contained in:
Chris Lu
2020-08-15 09:33:41 -07:00
parent c647deace1
commit 5b43bddf20
2 changed files with 10 additions and 11 deletions

View File

@@ -65,6 +65,7 @@ func (f *Filer) doBatchDeleteFolderMetaAndData(ctx context.Context, entry *Entry
}
if lastFileName == "" && !isRecursive && len(entries) > 0 {
// only for first iteration in the loop
glog.Errorf("deleting a folder %s has children: %+v", entry.FullPath, entries)
return nil, fmt.Errorf("fail to delete non-empty folder: %s", entry.FullPath)
}