rishabhdaim commented on code in PR #2558:
URL: https://github.com/apache/jackrabbit-oak/pull/2558#discussion_r2413393907


##########
oak-blob-cloud/src/main/java/org/apache/jackrabbit/oak/blob/cloud/s3/S3Backend.java:
##########
@@ -421,15 +414,20 @@ public InputStream read(DataIdentifier identifier)
         ClassLoader contextClassLoader = 
Thread.currentThread().getContextClassLoader();
         try {
             
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
-            S3Object object = s3service.getObject(bucket, key);
-            InputStream in = object.getObjectContent();
-            LOG.debug("[{}] read took [{}]ms", identifier, 
(System.currentTimeMillis() - start));
+            InputStream in = s3Client.getObject(s3ReqDecorator.decorate(
+                    GetObjectRequest.builder()
+                            .bucket(bucket)
+                            .key(key)
+                            .build()),
+                    ResponseTransformer.toInputStream());
+
+            LOG.debug("[{}] read took [{}]ms", identifier, 
System.currentTimeMillis() - start);

Review Comment:
   They were written using `System.currentTimeMillis`, so we used that to keep 
the symmetry.



##########
oak-blob-cloud/src/main/java/org/apache/jackrabbit/oak/blob/cloud/s3/S3Backend.java:
##########
@@ -1276,22 +1287,24 @@ private void renameKeys() throws DataStoreException {
             } catch (InterruptedException ie) {
 
             }
-            LOG.info("Renamed [{}] keys, time taken [{}]sec", count,
-                ((System.currentTimeMillis() - startTime) / 1000));
+            LOG.info("Renamed [{}] keys, time taken [{}]sec", count, 
((System.currentTimeMillis() - startTime) / 1000));

Review Comment:
   same as above.



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