|
@ -3,6 +3,7 @@ package command |
|
|
import ( |
|
|
import ( |
|
|
"context" |
|
|
"context" |
|
|
"fmt" |
|
|
"fmt" |
|
|
|
|
|
"github.com/seaweedfs/seaweedfs/weed/s3api/s3_constants" |
|
|
"os" |
|
|
"os" |
|
|
"strings" |
|
|
"strings" |
|
|
"time" |
|
|
"time" |
|
@ -107,6 +108,9 @@ func makeEventProcessor(remoteStorage *remote_pb.RemoteConf, mountedDir string, |
|
|
return nil |
|
|
return nil |
|
|
} |
|
|
} |
|
|
if filer_pb.IsCreate(resp) { |
|
|
if filer_pb.IsCreate(resp) { |
|
|
|
|
|
if strings.Contains(message.NewParentPath, "/"+s3_constants.MultipartUploadsFolder+"/") { |
|
|
|
|
|
return nil |
|
|
|
|
|
} |
|
|
if !filer.HasData(message.NewEntry) { |
|
|
if !filer.HasData(message.NewEntry) { |
|
|
return nil |
|
|
return nil |
|
|
} |
|
|
} |
|
@ -156,8 +160,10 @@ func makeEventProcessor(remoteStorage *remote_pb.RemoteConf, mountedDir string, |
|
|
glog.V(2).Infof("update: %+v", resp) |
|
|
glog.V(2).Infof("update: %+v", resp) |
|
|
glog.V(0).Infof("delete %s", remote_storage.FormatLocation(oldDest)) |
|
|
glog.V(0).Infof("delete %s", remote_storage.FormatLocation(oldDest)) |
|
|
if err := client.DeleteFile(oldDest); err != nil { |
|
|
if err := client.DeleteFile(oldDest); err != nil { |
|
|
|
|
|
if !strings.Contains(resp.Directory, "/"+s3_constants.MultipartUploadsFolder+"/") { |
|
|
return err |
|
|
return err |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
remoteEntry, writeErr := retriedWriteFile(client, filerSource, message.NewEntry, dest) |
|
|
remoteEntry, writeErr := retriedWriteFile(client, filerSource, message.NewEntry, dest) |
|
|
if writeErr != nil { |
|
|
if writeErr != nil { |
|
|
return writeErr |
|
|
return writeErr |
|
|
xxxxxxxxxx