aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorqzh <951012707@qq.com>2022-08-16 14:43:52 +0800
committerGitHub <noreply@github.com>2022-08-15 23:43:52 -0700
commit7fcfaf7bc9bbf95088ac27140a302bb151b07b0d (patch)
tree9cdbc992cabb95fb8e313b6747af578b1d668b88
parent400f0c3e5df9a5fc829d238c6cc47df28e4aba7d (diff)
downloadseaweedfs-7fcfaf7bc9bbf95088ac27140a302bb151b07b0d.tar.xz
seaweedfs-7fcfaf7bc9bbf95088ac27140a302bb151b07b0d.zip
fix(filer.sync): offset may be set to 0 (#3451)
* fix(filer.sync): initializing the offset is related to the path * fix(filer.sync): the offset maybe to be set to 0. Co-authored-by: zhihao.qu <zhihao.qu@ly.com>
-rw-r--r--weed/command/filer_sync.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/weed/command/filer_sync.go b/weed/command/filer_sync.go
index 5c085947a..d6f1d63d8 100644
--- a/weed/command/filer_sync.go
+++ b/weed/command/filer_sync.go
@@ -259,6 +259,9 @@ func doSubscribeFilerMetaChanges(clientId int32, clientEpoch int32, grpcDialOpti
processor.AddSyncJob(resp)
return nil
}, 3*time.Second, func(counter int64, lastTsNs int64) error {
+ if processor.processedTsWatermark == 0 {
+ return nil
+ }
// use processor.processedTsWatermark instead of the lastTsNs from the most recent job
now := time.Now().UnixNano()
glog.V(0).Infof("sync %s to %s progressed to %v %0.2f/sec", sourceFiler, targetFiler, time.Unix(0, processor.processedTsWatermark), float64(counter)/(float64(now-lastLogTsNs)/1e9))