ierandra commented on code in PR #1861:
URL: https://github.com/apache/jackrabbit-oak/pull/1861#discussion_r1865879355


##########
oak-blob-cloud-azure/src/main/java/org/apache/jackrabbit/oak/blob/cloud/azure/blobstorage/AzureBlobStoreBackend.java:
##########
@@ -658,29 +545,23 @@ public List<DataRecord> getAllMetadataRecords(String 
prefix) {
         try {
             
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
 
-            CloudBlobDirectory metaDir = 
getAzureContainer().getDirectoryReference(META_DIR_NAME);
-            for (ListBlobItem item : metaDir.listBlobs(prefix)) {
-                if (item instanceof CloudBlob) {
-                    CloudBlob blob = (CloudBlob) item;
-                    blob.downloadAttributes();
-                    records.add(new AzureBlobStoreDataRecord(
-                            this,
-                            azureBlobContainerProvider,
-                            new 
DataIdentifier(stripMetaKeyPrefix(blob.getName())),
-                            getLastModified(blob),
-                            blob.getProperties().getLength(),
-                            true));
-                }
+            for (BlobItem blobItem : 
getAzureContainer().listBlobsByHierarchy(META_DIR_NAME)) {

Review Comment:
   `listBlobsByHierarchy` is listing only the hierarchy, so 'META/'.
   this has to be changed with
   ```
   ListBlobsOptions listBlobsOptions = new ListBlobsOptions();
   listBlobsOptions.setPrefix(META_DIR_NAME);
   getAzureContainer().listBlobs(listBlobsOptions, null);
   ```
   



-- 
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: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to