SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
handle cases when mounted directory does not exist
Chris Lua9b41900d87f
diff --git a/weed/command/filer_remote_sync.go b/weed/command/filer_remote_sync.goindex e9286b7052..db5ce8b90e 100644--- a/weed/command/filer_remote_sync.go+++ b/weed/command/filer_remote_sync.go@@ -116,11 +116,15 @@ func followUpdatesAndUploadToRemote(option *RemoteSyncOptions, filerSource *sour}lastOffsetTsNs, err := getOffset(option.grpcDialOption, *option.filerAddress, RemoteSyncKeyPrefix, int32(dirHash))- if err == nil && mountedDirEntry.Attributes.Crtime < lastOffsetTsNs/1000000 {- lastOffsetTs = time.Unix(0, lastOffsetTsNs)- glog.V(0).Infof("resume from %v", lastOffsetTs)+ if mountedDirEntry != nil {+ if err == nil && mountedDirEntry.Attributes.Crtime < lastOffsetTsNs/1000000 {+ lastOffsetTs = time.Unix(0, lastOffsetTsNs)+ glog.V(0).Infof("resume from %v", lastOffsetTs)+ } else {+ lastOffsetTs = time.Unix(mountedDirEntry.Attributes.Crtime, 0)+ }} else {- lastOffsetTs = time.Unix(mountedDirEntry.Attributes.Crtime, 0)+ lastOffsetTs = time.Now()}} else {lastOffsetTs = time.Now().Add(-*option.timeAgo)