wgtmac commented on code in PR #669:
URL: https://github.com/apache/iceberg-cpp/pull/669#discussion_r3286497055
##########
src/iceberg/update/expire_snapshots.cc:
##########
@@ -100,13 +103,39 @@ class FileCleanupStrategy {
/// \brief Delete files at the given locations.
void DeleteFiles(const std::unordered_set<std::string>& paths) {
+ if (paths.empty()) {
+ return;
+ }
+
+ std::vector<std::string> path_list(paths.begin(), paths.end());
+ auto parallelism = std::min(kDefaultDeleteParallelism, path_list.size());
+ if (parallelism <= 1) {
+ DeleteFileRange(path_list, 0, path_list.size());
+ return;
+ }
+
+ std::vector<std::thread> workers;
Review Comment:
I think a better approach is to introduce a general purpose thread pool,
which is assigned to @HuaHuaY as per 0.3.0 planning.
--
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]