HuaHuaY commented on code in PR #770:
URL: https://github.com/apache/iceberg-cpp/pull/770#discussion_r3465815421


##########
src/iceberg/update/expire_snapshots.cc:
##########
@@ -343,38 +337,38 @@ class ReachableFileCleanup : public FileCleanupStrategy {
       const TableMetadata& metadata,
       const std::unordered_set<ManifestFile>& manifests_to_delete,
       const std::unordered_set<ManifestFile>& current_manifests) {
-    std::unordered_set<std::string> data_files_to_delete;
-
     // Collect live file paths from manifests being deleted.
-    for (const auto& manifest : manifests_to_delete) {
-      auto live_data_files = ReadLiveDataFilePaths(metadata, manifest);
-      // Ignore expired-manifest read failures and keep scanning candidates.
-      if (!live_data_files.has_value()) {
-        continue;
-      }
-
-      data_files_to_delete.insert(live_data_files->begin(), 
live_data_files->end());
+    auto live_file_results = ParallelCollect(
+        plan_executor_, manifests_to_delete,
+        [this, &metadata](
+            const ManifestFile& manifest) -> 
Result<std::unordered_set<std::string>> {
+          auto result = ReadLiveDataFilePaths(metadata, manifest);

Review Comment:
   This isn't a problem introduced by this PR. It can be fixed in a future PR.



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