aboutsummaryrefslogtreecommitdiff
path: root/weed/command
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2023-12-13 12:02:57 -0800
committerchrislu <chris.lu@gmail.com>2023-12-13 12:02:57 -0800
commit915416a277ddcb47a6ac133441e997678846216a (patch)
treeab8d8b28a16fa38ae22f3ba3ce46343268a1b26b /weed/command
parent1397b1ca09942da0a26c42444fc4a3eff316d4d7 (diff)
downloadseaweedfs-915416a277ddcb47a6ac133441e997678846216a.tar.xz
seaweedfs-915416a277ddcb47a6ac133441e997678846216a.zip
fix wrong parameter
fix https://github.com/seaweedfs/seaweedfs/pull/5102
Diffstat (limited to 'weed/command')
-rw-r--r--weed/command/filer_remote_gateway_buckets.go6
-rw-r--r--weed/command/filer_remote_sync_dir.go8
2 files changed, 7 insertions, 7 deletions
diff --git a/weed/command/filer_remote_gateway_buckets.go b/weed/command/filer_remote_gateway_buckets.go
index aae0be736..9694a1c9c 100644
--- a/weed/command/filer_remote_gateway_buckets.go
+++ b/weed/command/filer_remote_gateway_buckets.go
@@ -224,7 +224,7 @@ func (option *RemoteGatewayOptions) makeBucketedEventProcessor(filerSource *sour
if writeErr != nil {
return writeErr
}
- return updateLocalEntry(&remoteSyncOptions, message.NewParentPath, message.NewEntry, remoteEntry)
+ return updateLocalEntry(option, message.NewParentPath, message.NewEntry, remoteEntry)
}
if filer_pb.IsDelete(resp) {
if resp.Directory == option.bucketsDir {
@@ -288,7 +288,7 @@ func (option *RemoteGatewayOptions) makeBucketedEventProcessor(filerSource *sour
if writeErr != nil {
return writeErr
}
- return updateLocalEntry(&remoteSyncOptions, message.NewParentPath, message.NewEntry, remoteEntry)
+ return updateLocalEntry(option, message.NewParentPath, message.NewEntry, remoteEntry)
}
}
}
@@ -325,7 +325,7 @@ func (option *RemoteGatewayOptions) makeBucketedEventProcessor(filerSource *sour
if writeErr != nil {
return writeErr
}
- return updateLocalEntry(&remoteSyncOptions, message.NewParentPath, message.NewEntry, remoteEntry)
+ return updateLocalEntry(option, message.NewParentPath, message.NewEntry, remoteEntry)
}
}
diff --git a/weed/command/filer_remote_sync_dir.go b/weed/command/filer_remote_sync_dir.go
index 1dc91b5d5..892af17a0 100644
--- a/weed/command/filer_remote_sync_dir.go
+++ b/weed/command/filer_remote_sync_dir.go
@@ -28,7 +28,7 @@ func followUpdatesAndUploadToRemote(option *RemoteSyncOptions, filerSource *sour
return fmt.Errorf("read mount info: %v", detectErr)
}
- eachEntryFunc, err := makeEventProcessor(remoteStorage, mountedDir, remoteStorageMountLocation, filerSource)
+ eachEntryFunc, err := option.makeEventProcessor(remoteStorage, mountedDir, remoteStorageMountLocation, filerSource)
if err != nil {
return err
}
@@ -80,7 +80,7 @@ func followUpdatesAndUploadToRemote(option *RemoteSyncOptions, filerSource *sour
return pb.FollowMetadata(pb.ServerAddress(*option.filerAddress), option.grpcDialOption, metadataFollowOption, processEventFnWithOffset)
}
-func makeEventProcessor(remoteStorage *remote_pb.RemoteConf, mountedDir string, remoteStorageMountLocation *remote_pb.RemoteStorageLocation, filerSource *source.FilerSource) (pb.ProcessMetadataFunc, error) {
+func (option *RemoteSyncOptions) makeEventProcessor(remoteStorage *remote_pb.RemoteConf, mountedDir string, remoteStorageMountLocation *remote_pb.RemoteStorageLocation, filerSource *source.FilerSource) (pb.ProcessMetadataFunc, error) {
client, err := remote_storage.GetRemoteStorage(remoteStorage)
if err != nil {
return nil, err
@@ -152,7 +152,7 @@ func makeEventProcessor(remoteStorage *remote_pb.RemoteConf, mountedDir string,
if writeErr != nil {
return writeErr
}
- return updateLocalEntry(&remoteSyncOptions, message.NewParentPath, message.NewEntry, remoteEntry)
+ return updateLocalEntry(option, message.NewParentPath, message.NewEntry, remoteEntry)
}
if filer_pb.IsDelete(resp) {
glog.V(2).Infof("delete: %+v", resp)
@@ -191,7 +191,7 @@ func makeEventProcessor(remoteStorage *remote_pb.RemoteConf, mountedDir string,
if writeErr != nil {
return writeErr
}
- return updateLocalEntry(&remoteSyncOptions, message.NewParentPath, message.NewEntry, remoteEntry)
+ return updateLocalEntry(option, message.NewParentPath, message.NewEntry, remoteEntry)
}
return nil