Skip to content

Commit

Permalink
used different client for remote object refreshment
Browse files Browse the repository at this point in the history
  • Loading branch information
smiklosovic committed May 31, 2023
1 parent a4790d1 commit e24c752
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/instaclustr/esop/s3/v2/BaseS3Backuper.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public void init(List<ManifestEntry> manifestEntries) {
public FreshenResult freshenRemoteObject(ManifestEntry manifestEntry, RemoteObjectReference object) {
List<Tag> tags;
try {
tags = s3Clients.getNonEncryptingClient()
tags = s3Clients.getClient()
.getObjectTagging(GetObjectTaggingRequest.builder()
.bucket(request.storageLocation.bucket)
.key(object.canonicalPath)
Expand Down Expand Up @@ -196,7 +196,7 @@ public FreshenResult freshenRemoteObject(ManifestEntry manifestEntry, RemoteObje
.multipartUpload(CompletedMultipartUpload.builder()
.parts(completedParts.toArray(new CompletedPart[0]))
.build()).build();
CompleteMultipartUploadResponse completeMultipartUploadResponse = s3Clients.getNonEncryptingClient().completeMultipartUpload(completeRequest);
CompleteMultipartUploadResponse completeMultipartUploadResponse = s3Clients.getClient().completeMultipartUpload(completeRequest);

if (!completeMultipartUploadResponse.sdkHttpResponse().isSuccessful()) {
throw new RuntimeException(String.format("Unsuccessful multipart copying of %s, upload id %s", object.canonicalPath, uploadId));
Expand Down

0 comments on commit e24c752

Please sign in to comment.