diff options
| author | chrislu <chris.lu@gmail.com> | 2022-12-17 13:18:35 -0800 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-12-17 13:18:35 -0800 |
| commit | 8a40fa8993b531f04d3b7100679ff5675d3f8c90 (patch) | |
| tree | 7ee04a3d9f35b605aa196fb39a85cd7f22f2d822 | |
| parent | 438146249f50bf36b4c46ece02a430f44152777f (diff) | |
| download | seaweedfs-8a40fa8993b531f04d3b7100679ff5675d3f8c90.tar.xz seaweedfs-8a40fa8993b531f04d3b7100679ff5675d3f8c90.zip | |
more detailed logs
| -rw-r--r-- | weed/command/filer_sync.go | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/weed/command/filer_sync.go b/weed/command/filer_sync.go index 00afab535..992b9dd4e 100644 --- a/weed/command/filer_sync.go +++ b/weed/command/filer_sync.go @@ -399,7 +399,11 @@ func genProcessFunction(sourcePath string, targetPath string, excludePaths []str return nil } key := buildKey(dataSink, message, targetPath, sourceNewKey, sourcePath) - return dataSink.CreateEntry(key, message.NewEntry, message.Signatures) + if err := dataSink.CreateEntry(key, message.NewEntry, message.Signatures); err != nil { + return fmt.Errorf("create entry1 : %v", err) + } else { + return nil + } } // this is something special? @@ -427,7 +431,11 @@ func genProcessFunction(sourcePath string, targetPath string, excludePaths []str } // create the new entry newKey := buildKey(dataSink, message, targetPath, sourceNewKey, sourcePath) - return dataSink.CreateEntry(newKey, message.NewEntry, message.Signatures) + if err := dataSink.CreateEntry(newKey, message.NewEntry, message.Signatures); err != nil { + return fmt.Errorf("create entry2 : %v", err) + } else { + return nil + } } else { // new key is outside of the watched directory @@ -441,7 +449,11 @@ func genProcessFunction(sourcePath string, targetPath string, excludePaths []str if strings.HasPrefix(string(sourceNewKey), sourcePath) { // new key is in the watched directory key := buildKey(dataSink, message, targetPath, sourceNewKey, sourcePath) - return dataSink.CreateEntry(key, message.NewEntry, message.Signatures) + if err := dataSink.CreateEntry(key, message.NewEntry, message.Signatures); err != nil { + return fmt.Errorf("create entry3 : %v", err) + } else { + return nil + } } else { // new key is also outside of the watched directory // skip |
