plusplusjiajia commented on code in PR #966:
URL: https://github.com/apache/iceberg-cpp/pull/966#discussion_r4111392917
##########
src/iceberg/arrow/s3/arrow_s3_file_io.cc:
##########
@@ -284,12 +284,18 @@ Status ArrowS3FileIO::DeleteFile(const std::string&
file_location) {
}
Status ArrowS3FileIO::DeleteFiles(const std::vector<std::string>&
file_locations) {
- std::unordered_map<ArrowFileSystemFileIO*, std::vector<std::string>>
locations_by_io;
+ // Like Java's S3FileIO, keep going after a failure and report the count.
+ // Arrow's S3 DeleteFiles deletes one file at a time too.
+ size_t failed = 0;
for (const auto& file_location : file_locations) {
- locations_by_io[&FileIOForPath(file_location)].push_back(file_location);
+ if (auto status = FileIOForPath(file_location).DeleteFile(file_location);
Review Comment:
@zhjwpku Thanks! Done: deletes now run on up to s3.delete.num-threads
threads (default: hardware threads), as in Java. Java also batches keys into
DeleteObjects; Arrow has no public batch delete for S3, so each thread deletes
one file at a time.
--
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]