From b7996503578567f50ca6bebd25a2dfe777fa333c Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Wed, 11 Mar 2026 12:55:45 -0700 Subject: [PATCH] fix(shell): set LastLocalSyncTsNs in remote.copy.local so remote.uncache works (#8604) remote.uncache checks LastLocalSyncTsNs to determine if a file has been synced to remote. remote.copy.local was not setting this field, leaving it at 0, which caused uncache to skip all files uploaded via remote.copy.local. Fixes #8602 --- weed/shell/command_remote_copy_local.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/weed/shell/command_remote_copy_local.go b/weed/shell/command_remote_copy_local.go index 4696bf9f2..4d5495856 100644 --- a/weed/shell/command_remote_copy_local.go +++ b/weed/shell/command_remote_copy_local.go @@ -8,6 +8,7 @@ import ( "strings" "sync" "sync/atomic" + "time" "github.com/seaweedfs/seaweedfs/weed/filer" "github.com/seaweedfs/seaweedfs/weed/pb/filer_pb" @@ -253,6 +254,7 @@ func syncFileToRemote(commandEnv *CommandEnv, remoteStorage remote_storage.Remot ctx := context.Background() // Update local entry with remote information + remoteEntry.LastLocalSyncTsNs = time.Now().UnixNano() localEntry.RemoteEntry = remoteEntry // Update the entry