From 11603cf7a43bca0d696c88282e32c07a279f5917 Mon Sep 17 00:00:00 2001 From: Peter Date: Thu, 5 Mar 2026 17:38:30 +0000 Subject: [PATCH] filer: streamline remote delete client lookup and logging Avoid a redundant mount trie traversal by resolving the remote client directly from the matched mount location, and add parity logging for successful remote directory deletions. Made-with: Cursor --- weed/filer/filer_lazy_remote.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/weed/filer/filer_lazy_remote.go b/weed/filer/filer_lazy_remote.go index 3f176f75d..017827de9 100644 --- a/weed/filer/filer_lazy_remote.go +++ b/weed/filer/filer_lazy_remote.go @@ -125,7 +125,7 @@ func (f *Filer) maybeDeleteFromRemote(ctx context.Context, entry *Entry) (bool, return false, nil } - client, _, found := f.RemoteStorage.FindRemoteStorageClient(entry.FullPath) + client, _, found := f.RemoteStorage.GetRemoteStorageClient(remoteLoc.Name) if !found || client == nil { return false, fmt.Errorf("resolve remote storage client for %s: not found", entry.FullPath) } @@ -139,6 +139,7 @@ func (f *Filer) maybeDeleteFromRemote(ctx context.Context, entry *Entry) (bool, } return false, fmt.Errorf("remove remote directory %s: %w", entry.FullPath, err) } + glog.V(3).InfofCtx(ctx, "maybeDeleteFromRemote: deleted directory %s from remote", entry.FullPath) return true, nil }