caohoangha126 opened a new issue, #9164:
URL: https://github.com/apache/iceberg/issues/9164

   ### Apache Iceberg version
   
   1.4.0
   
   ### Query engine
   
   None
   
   ### Please describe the bug 🐞
   
   I am using the 
[CatalogUtil::dropTableData](https://sourcegraph.com/github.com/apache/iceberg@e8cf33db7d3fc637504a51a801c055dce54474b7/-/blob/core/src/main/java/org/apache/iceberg/CatalogUtil.java?L86)
 to delete data and metadata files for my tables after I drop them from the 
catalog. I notice that if the program terminates unexpectedly (e.g. VM 
shutdown, connection exception, etc.) midway through `dropTableData`, if it 
successfully deletes the manifest files (.avro files), but fails somewhere 
after that (it hasn’t got to delete the metadata.json file), on a retry, 
`CatalogUtil::dropTableData` will fail at [line 94 – 
Iterables.addAll(manifestsToDelete, 
snapshot.allManifests(io))](https://sourcegraph.com/github.com/apache/iceberg@e8cf33db7d3fc637504a51a801c055dce54474b7/-/blob/core/src/main/java/org/apache/iceberg/CatalogUtil.java?L94)
 (specifically because of `snapshot.allManifests`) with awssdk 
`NoSuchKeyException` because the manifest file (.avro file) is no longer there. 
Th
 erefore, the underlying files for a dropped table end up being partially 
deleted.
   Instead of letting it throw an exception at this line, maybe we should catch 
the error and add a WARN log and let it continue to delete other files 
afterwards.


-- 
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: issues-unsubscr...@iceberg.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to