amogh-jahagirdar commented on a change in pull request #4342:
URL: https://github.com/apache/iceberg/pull/4342#discussion_r829670623



##########
File path: aws/src/main/java/org/apache/iceberg/aws/s3/S3FileIO.java
##########
@@ -125,6 +141,15 @@ public void deleteFile(String path) {
    */
   @Override
   public void deleteFiles(Iterable<String> paths) throws 
BulkDeletionFailureException {
+    if (awsProperties.s3DeleteTags() != null && 
!awsProperties.s3DeleteTags().isEmpty()) {
+      Tasks.foreach(paths)
+          .noRetry()
+          .suppressFailureWhenFinished()
+          .onFailure((path, exc) -> LOG.warn("Failed to add delete tags: {}", 
path, exc))
+          .run(this::doSoftDelete);

Review comment:
       Should we have a threadpool here? So we can parallelize the fetching and 
updating of tags.

##########
File path: aws/src/main/java/org/apache/iceberg/aws/s3/S3FileIO.java
##########
@@ -125,6 +141,15 @@ public void deleteFile(String path) {
    */
   @Override
   public void deleteFiles(Iterable<String> paths) throws 
BulkDeletionFailureException {
+    if (awsProperties.s3DeleteTags() != null && 
!awsProperties.s3DeleteTags().isEmpty()) {
+      Tasks.foreach(paths)
+          .noRetry()
+          .suppressFailureWhenFinished()
+          .onFailure((path, exc) -> LOG.warn("Failed to add delete tags: {}", 
path, exc))
+          .run(this::doSoftDelete);

Review comment:
       Should we have a configurable threadpool here? So we can parallelize the 
fetching and updating of tags.
   
   ```      Tasks.foreach(paths)
             .noRetry()
             .suppressFailureWhenFinished()
             .onFailure((path, exc) -> LOG.warn("Failed to add delete tags: 
{}", path, exc))
             .run(this::doSoftDelete);
   ```

##########
File path: aws/src/main/java/org/apache/iceberg/aws/s3/S3FileIO.java
##########
@@ -125,6 +141,15 @@ public void deleteFile(String path) {
    */
   @Override
   public void deleteFiles(Iterable<String> paths) throws 
BulkDeletionFailureException {
+    if (awsProperties.s3DeleteTags() != null && 
!awsProperties.s3DeleteTags().isEmpty()) {
+      Tasks.foreach(paths)
+          .noRetry()
+          .suppressFailureWhenFinished()
+          .onFailure((path, exc) -> LOG.warn("Failed to add delete tags: {}", 
path, exc))
+          .run(this::doSoftDelete);

Review comment:
       Should we have a configurable threadpool here? So we can parallelize the 
fetching and updating of tags.
   
   ```     
    Tasks.foreach(paths)
             .noRetry()
             .suppressFailureWhenFinished()
             .onFailure((path, exc) -> LOG.warn("Failed to add delete tags: 
{}", path, exc))
             .run(this::doSoftDelete);
   ```

##########
File path: aws/src/main/java/org/apache/iceberg/aws/s3/S3FileIO.java
##########
@@ -125,6 +141,15 @@ public void deleteFile(String path) {
    */
   @Override
   public void deleteFiles(Iterable<String> paths) throws 
BulkDeletionFailureException {
+    if (awsProperties.s3DeleteTags() != null && 
!awsProperties.s3DeleteTags().isEmpty()) {
+      Tasks.foreach(paths)
+          .noRetry()
+          .suppressFailureWhenFinished()
+          .onFailure((path, exc) -> LOG.warn("Failed to add delete tags: {}", 
path, exc))
+          .run(this::doSoftDelete);

Review comment:
       Should we have a configurable threadpool here? So we can parallelize the 
fetching and updating of tags. I've been thinking S3FileIO should implicitly 
have a threadpool but maybe it does not fit in the FileIO model
   
   ```     
    Tasks.foreach(paths)
             .noRetry()
             .executeWith(s3FileIoThreadPool)
             .suppressFailureWhenFinished()
             .onFailure((path, exc) -> LOG.warn("Failed to add delete tags: 
{}", path, exc))
             .run(this::doSoftDelete);
   ```

##########
File path: aws/src/main/java/org/apache/iceberg/aws/s3/S3FileIO.java
##########
@@ -125,6 +141,15 @@ public void deleteFile(String path) {
    */
   @Override
   public void deleteFiles(Iterable<String> paths) throws 
BulkDeletionFailureException {
+    if (awsProperties.s3DeleteTags() != null && 
!awsProperties.s3DeleteTags().isEmpty()) {
+      Tasks.foreach(paths)
+          .noRetry()
+          .suppressFailureWhenFinished()
+          .onFailure((path, exc) -> LOG.warn("Failed to add delete tags: {}", 
path, exc))
+          .run(this::doSoftDelete);

Review comment:
       Should we have a configurable threadpool here? So we can get better 
throughput on the fetching and updating of tags. I've been thinking S3FileIO 
should implicitly have a threadpool but maybe it does not fit in the FileIO 
model
   
   ```     
    Tasks.foreach(paths)
             .noRetry()
             .executeWith(s3FileIoThreadPool)
             .suppressFailureWhenFinished()
             .onFailure((path, exc) -> LOG.warn("Failed to add delete tags: 
{}", path, exc))
             .run(this::doSoftDelete);
   ```




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to