seropian commented on code in PR #2409:
URL: https://github.com/apache/jackrabbit-oak/pull/2409#discussion_r2419053681


##########
oak-blob-cloud-azure/src/main/java/org/apache/jackrabbit/oak/blob/cloud/azure/blobstorage/AzureBlobStoreBackend.java:
##########
@@ -719,34 +665,30 @@ public boolean deleteMetadataRecord(String name) {
 
     @Override
     public void deleteAllMetadataRecords(String prefix) {
-        if (null == prefix) {
-            throw new NullPointerException("prefix");
-        }
-        long start = System.currentTimeMillis();
+        Objects.requireNonNull(prefix, "prefix must not be null");
+
+        Stopwatch stopwatch = Stopwatch.createStarted();
         ClassLoader contextClassLoader = 
Thread.currentThread().getContextClassLoader();
         try {
             
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
 
-            CloudBlobDirectory metaDir = 
getAzureContainer().getDirectoryReference(META_DIR_NAME);
             int total = 0;
-            for (ListBlobItem item : metaDir.listBlobs(prefix)) {
-                if (item instanceof CloudBlob) {
-                    if (((CloudBlob)item).deleteIfExists()) {
-                        total++;
-                    }
+
+            ListBlobsOptions listBlobsOptions = new ListBlobsOptions();
+            
listBlobsOptions.setPrefix(AzureConstants.AZURE_BlOB_META_DIR_NAME);

Review Comment:
   fixed



##########
oak-blob-cloud-azure/src/main/java/org/apache/jackrabbit/oak/blob/cloud/azure/blobstorage/AzureBlobStoreBackend.java:
##########
@@ -874,24 +814,9 @@ URI createHttpDownloadURI(@NotNull DataIdentifier 
identifier,
                 }
 
                 String key = getKeyName(identifier);
-                SharedAccessBlobHeaders headers = new 
SharedAccessBlobHeaders();
-                headers.setCacheControl(String.format("private, max-age=%d, 
immutable", httpDownloadURIExpirySeconds));
-
-                String contentType = downloadOptions.getContentTypeHeader();
-                if (! StringUtils.isEmpty(contentType)) {
-                    headers.setContentType(contentType);
-                }
-
-                String contentDisposition =
-                        downloadOptions.getContentDispositionHeader();
-                if (! StringUtils.isEmpty(contentDisposition)) {
-                    headers.setContentDisposition(contentDisposition);
-                }
-
                 uri = createPresignedURI(key,
-                        EnumSet.of(SharedAccessBlobPermissions.READ),
+                        new BlobSasPermission().setReadPermission(true),

Review Comment:
   fixed



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