aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_remote_mount.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-08-14 21:46:34 -0700
committerChris Lu <chris.lu@gmail.com>2021-08-14 21:46:34 -0700
commitc34747c79d99d8a08bea31b7339b17dca6fad44d (patch)
treec4c119eef25e06e778eff894ec258e607a0774b4 /weed/shell/command_remote_mount.go
parentcb53802752919fd91342927b401f8f66652c79ec (diff)
downloadseaweedfs-c34747c79d99d8a08bea31b7339b17dca6fad44d.tar.xz
seaweedfs-c34747c79d99d8a08bea31b7339b17dca6fad44d.zip
rename, fix wrong logic.
Diffstat (limited to 'weed/shell/command_remote_mount.go')
-rw-r--r--weed/shell/command_remote_mount.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/weed/shell/command_remote_mount.go b/weed/shell/command_remote_mount.go
index 189d1d937..2483fa5be 100644
--- a/weed/shell/command_remote_mount.go
+++ b/weed/shell/command_remote_mount.go
@@ -234,6 +234,16 @@ func (c *commandRemoteMount) saveMountMapping(commandEnv *CommandEnv, writer io.
return nil
}
+// if an entry has synchronized metadata but has not synchronized content
+// entry.Attributes.FileSize == entry.RemoteEntry.RemoteSize
+// entry.Attributes.Mtime == entry.RemoteEntry.RemoteMtime
+// entry.RemoteEntry.LastLocalSyncTsNs == 0
+// if an entry has synchronized metadata but has synchronized content before
+// entry.Attributes.FileSize == entry.RemoteEntry.RemoteSize
+// entry.Attributes.Mtime == entry.RemoteEntry.RemoteMtime
+// entry.RemoteEntry.LastLocalSyncTsNs > 0
+// if an entry has synchronized metadata but has new updates
+// entry.Attributes.Mtime * 1,000,000,000 > entry.RemoteEntry.LastLocalSyncTsNs
func doSaveRemoteEntry(client filer_pb.SeaweedFilerClient, localDir string, existingEntry *filer_pb.Entry, remoteEntry *filer_pb.RemoteEntry) error {
existingEntry.RemoteEntry = remoteEntry
existingEntry.Attributes.FileSize = uint64(remoteEntry.RemoteSize)