diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-11-06 11:28:30 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-11-06 11:29:50 -0700 |
| commit | 04663c3611326a8bac87d47fc4a2c546c6d9acdd (patch) | |
| tree | 3cf524f3a031dac7e3d859abf09a658c5fa5f0e5 | |
| parent | 330d1fde7f6a9634c1242a0490fab30cbdb12c6c (diff) | |
| download | seaweedfs-04663c3611326a8bac87d47fc4a2c546c6d9acdd.tar.xz seaweedfs-04663c3611326a8bac87d47fc4a2c546c6d9acdd.zip | |
remote.mount: print out metadata sync errors
| -rw-r--r-- | weed/remote_storage/s3/s3_storage_client.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/weed/remote_storage/s3/s3_storage_client.go b/weed/remote_storage/s3/s3_storage_client.go index b8701cb52..735dadf34 100644 --- a/weed/remote_storage/s3/s3_storage_client.go +++ b/weed/remote_storage/s3/s3_storage_client.go @@ -83,6 +83,7 @@ func (s *s3RemoteStorageClient) Traverse(remote *remote_pb.RemoteStorageLocation } isLastPage := false for !isLastPage && err == nil { + var localErr error listErr := s.conn.ListObjectsV2Pages(listInput, func(page *s3.ListObjectsV2Output, lastPage bool) bool { for _, content := range page.Contents { key := *content.Key @@ -94,6 +95,7 @@ func (s *s3RemoteStorageClient) Traverse(remote *remote_pb.RemoteStorageLocation RemoteETag: *content.ETag, StorageName: s.conf.Name, }); err != nil { + localErr = err return false } } @@ -104,6 +106,9 @@ func (s *s3RemoteStorageClient) Traverse(remote *remote_pb.RemoteStorageLocation if listErr != nil { err = fmt.Errorf("list %v: %v", remote, listErr) } + if localErr != nil { + err = fmt.Errorf("process %v: %v", remote, localErr) + } } return } |
