aboutsummaryrefslogtreecommitdiff
path: root/weed/command
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2024-01-18 09:16:46 -0800
committerchrislu <chris.lu@gmail.com>2024-01-18 09:16:46 -0800
commit263f1f3d0474364607f33d44d9f34e2645120fec (patch)
tree37b9f5a82dfd30b7ac143a327298b6fdbbba7aae /weed/command
parentc8090b1f990fa25ae374bd3040a94b479054d3c4 (diff)
parent83e4b0251710b23121ed44b0f8741f150231a68a (diff)
downloadseaweedfs-263f1f3d0474364607f33d44d9f34e2645120fec.tar.xz
seaweedfs-263f1f3d0474364607f33d44d9f34e2645120fec.zip
Merge branch 'master' into mq-subscribe
Diffstat (limited to 'weed/command')
-rw-r--r--weed/command/filer_remote_sync_dir.go7
-rw-r--r--weed/command/filer_sync.go4
-rw-r--r--weed/command/scaffold.go6
3 files changed, 12 insertions, 5 deletions
diff --git a/weed/command/filer_remote_sync_dir.go b/weed/command/filer_remote_sync_dir.go
index 00f6d7493..dd3e94be6 100644
--- a/weed/command/filer_remote_sync_dir.go
+++ b/weed/command/filer_remote_sync_dir.go
@@ -278,7 +278,10 @@ func updateLocalEntry(filerClient filer_pb.FilerClient, dir string, entry *filer
}
func isMultipartUploadFile(dir string, name string) bool {
+ return isMultipartUploadDir(dir) && strings.HasSuffix(name, ".part")
+}
+
+func isMultipartUploadDir(dir string) bool {
return strings.HasPrefix(dir, "/buckets/") &&
- strings.Contains(dir, "/"+s3_constants.MultipartUploadsFolder+"/") &&
- strings.HasSuffix(name, ".part")
+ strings.Contains(dir, "/"+s3_constants.MultipartUploadsFolder+"/")
}
diff --git a/weed/command/filer_sync.go b/weed/command/filer_sync.go
index 20464fa50..292fb0956 100644
--- a/weed/command/filer_sync.go
+++ b/weed/command/filer_sync.go
@@ -394,6 +394,10 @@ func genProcessFunction(sourcePath string, targetPath string, excludePaths []str
glog.V(0).Infof("received %v", resp)
}
+ if isMultipartUploadDir(resp.Directory) {
+ return nil
+ }
+
if !strings.HasPrefix(resp.Directory, sourcePath) {
return nil
}
diff --git a/weed/command/scaffold.go b/weed/command/scaffold.go
index b37254bb5..5d1ccb13f 100644
--- a/weed/command/scaffold.go
+++ b/weed/command/scaffold.go
@@ -21,9 +21,9 @@ var cmdScaffold = &Command{
For example, the filer.toml mysql password can be overwritten by environment variable
export WEED_MYSQL_PASSWORD=some_password
Environment variable rules:
- * Prefix the variable name with "WEED_"
- * Uppercase the reset of variable name.
- * Replace '.' with '_'
+ * Prefix the variable name with "WEED_".
+ * Uppercase the rest of the variable name.
+ * Replace '.' with '_'.
`,
}