aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-09-02 12:32:59 -0700
committerChris Lu <chris.lu@gmail.com>2021-09-02 12:32:59 -0700
commit7f2a8246a94c367c409bb66d1b501f9ea5f51057 (patch)
tree35f42a495c2c0e1b08b8b8697033f63bbd5977f8
parent1b942dfa3c1da43daf83f03d7dbe490c444e1467 (diff)
downloadseaweedfs-7f2a8246a94c367c409bb66d1b501f9ea5f51057.tar.xz
seaweedfs-7f2a8246a94c367c409bb66d1b501f9ea5f51057.zip
minor
-rw-r--r--weed/command/filer_remote_sync.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/command/filer_remote_sync.go b/weed/command/filer_remote_sync.go
index 1312a1045..33926b720 100644
--- a/weed/command/filer_remote_sync.go
+++ b/weed/command/filer_remote_sync.go
@@ -105,8 +105,6 @@ func followUpdatesAndUploadToRemote(option *RemoteSyncOptions, filerSource *sour
return fmt.Errorf("read mount info: %v", detectErr)
}
- lastOffsetTs := collectLastSyncOffset(option, mountedDir)
-
eachEntryFunc, err := makeEventProcessor(remoteStorage, mountedDir, remoteStorageMountLocation, filerSource)
if err != nil {
return err
@@ -118,6 +116,8 @@ func followUpdatesAndUploadToRemote(option *RemoteSyncOptions, filerSource *sour
return remote_storage.SetSyncOffset(option.grpcDialOption, *option.filerAddress, mountedDir, lastTsNs)
})
+ lastOffsetTs := collectLastSyncOffset(option, mountedDir)
+
return pb.FollowMetadata(*option.filerAddress, option.grpcDialOption, "filer.remote.sync",
mountedDir, []string{filer.DirectoryEtcRemote}, lastOffsetTs.UnixNano(), 0, processEventFnWithOffset, false)
}