smiroslav commented on code in PR #2604:
URL: https://github.com/apache/jackrabbit-oak/pull/2604#discussion_r2490404253


##########
oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/AzureArchiveManager.java:
##########
@@ -336,6 +331,73 @@ private void copyBlob(BlobItem blob, String newParent) 
throws IOException {
 
     }
 
+    private void batchCopyBlobs(List<BlobItem> from, String to) {
+        String newParent = getDirectory(to);
+
+        log.info("Start tp copy {} blobs to {}", from.size(), newParent);
+
+        int batches = from.size() / COPY_BATCH;
+        int start = 0;
+        int end = COPY_BATCH;
+
+        for (int i = 0; i < batches; i++) {
+            log.info("Start batch {}/{}: {} to {}", i + 1, batches, start, 
end);
+            List<BlobItem> blobItemsBatch = from.subList(start, end);
+            copyBlobs(blobItemsBatch, newParent);
+            start = end;
+            end += COPY_BATCH;
+        }
+
+        log.info("Copy {} to {}", start, from.size());
+        copyBlobs(from.subList(start, from.size()), newParent);

Review Comment:
   Yes, that change would work if we add the size of the remaining batch to the 
log. 



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