Browse Source

remote.mount: print out metadata sync errors

pull/2427/head
Chris Lu 3 years ago
parent
commit
04663c3611
  1. 5
      weed/remote_storage/s3/s3_storage_client.go

5
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
}

Loading…
Cancel
Save