amit-jain commented on code in PR #2558:
URL: https://github.com/apache/jackrabbit-oak/pull/2558#discussion_r2434688275


##########
oak-blob-cloud/src/main/java/org/apache/jackrabbit/oak/blob/cloud/s3/S3Backend.java:
##########
@@ -469,11 +463,20 @@ public void deleteRecord(DataIdentifier identifier)
     @Override
     public void close() {
         // backend is closing. abort all mulitpart uploads from start.
-        if(s3service.doesBucketExist(bucket)) {
-            tmx.abortMultipartUploads(bucket, startTime);
+        try {
+            if(Utils.bucketExists(s3Client, bucket)) {
+                // List and abort multipart uploads initiated before startTime
+                Utils.abortMultipartUpload(bucket, startTime, s3Client);
+            }
+        } finally {
+            if (tmx != null) {
+                tmx.close();
+            }
+            if (s3AsyncClient != null) {
+                s3AsyncClient.close();
+            }
+            s3Client.close();

Review Comment:
   `            s3PresignService = 
Utils.createPresigner(Utils.openService(properties, true), properties);`
   with this a new s3 client object is being created but not closed but I see 
now the s3Presigner close has been added



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to