You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "adarshsanjeev (via GitHub)" <gi...@apache.org> on 2023/05/30 17:30:03 UTC

[GitHub] [druid] adarshsanjeev commented on a diff in pull request #14350: Add logs for deleting files using storage connector

adarshsanjeev commented on code in PR #14350:
URL: https://github.com/apache/druid/pull/14350#discussion_r1210600510


##########
extensions-core/s3-extensions/src/main/java/org/apache/druid/storage/s3/output/S3StorageConnector.java:
##########
@@ -280,8 +280,11 @@ public OutputStream write(String path) throws IOException
   public void deleteFile(String path) throws IOException
   {
     try {
+      final String fullPath = objectPath(path);
+      log.debug("Deleting file at bucket: %s, path: %s", config.getBucket(), fullPath);
+
       S3Utils.retryS3Operation(() -> {
-        s3Client.deleteObject(config.getBucket(), objectPath(path));
+        s3Client.deleteObject(config.getBucket(), fullPath);

Review Comment:
   Is there a reason we don't use deleteObjects for deleting a single file as well? I wonder if refactoring it to also pass through S3Utils like deleteFiles would be cleaner.



-- 
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: commits-unsubscribe@druid.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org