HuaHuaY commented on code in PR #687:
URL: https://github.com/apache/iceberg-cpp/pull/687#discussion_r3322038965
##########
src/iceberg/manifest/manifest_filter_manager.cc:
##########
@@ -401,19 +451,35 @@ Result<std::vector<ManifestFile>>
ManifestFilterManager::FilterManifests(
}
bool trust_manifest_references = CanTrustManifestReferences(manifests);
- manifest_evaluator_cache_.clear();
- residual_evaluator_cache_.clear();
+ {
+ std::lock_guard lock(manifest_evaluator_cache_mutex_);
+ manifest_evaluator_cache_.clear();
+ }
+ {
+ std::lock_guard lock(residual_evaluator_cache_mutex_);
+ residual_evaluator_cache_.clear();
+ }
+
+ std::vector<FilterManifestResult> filter_results(manifests.size());
+ auto filter_tasks = TaskGroup().SetExecutor(executor_);
+ for (auto&& [manifest, result] : std::views::zip(manifests, filter_results))
{
+ filter_tasks.Submit([&]() -> Status {
Review Comment:
There are too many variables captured by this lambda. It is inappropriate to
write the names clearly.
--
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]