Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core: Plan concurrently if there are multiple delete manifests #8388

Conversation

aokolnychyi
Copy link
Contributor

This PR ensures that data scans use a thread pool when there are more than 1 delete manifest, regardless of the number of data manifests

@github-actions github-actions bot added the core label Aug 24, 2023
@@ -87,7 +87,7 @@ public CloseableIterable<FileScanTask> doPlanFiles() {
manifestGroup = manifestGroup.ignoreResiduals();
}

if (dataManifests.size() > 1 && shouldPlanWithExecutor()) {
if (shouldPlanWithExecutor() && (dataManifests.size() > 1 || deleteManifests.size() > 1)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Data and deletes are planned separately. If we are scanning 1 data manifest, it does not mean we shouldn't parallelize the planing of deletes.

ManifestGroup planWith(ExecutorService newExecutorService) {
  this.executorService = newExecutorService;
  deleteIndexBuilder.planWith(newExecutorService);
  return this;
}

Copy link
Contributor

@singhpk234 singhpk234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks @aokolnychyi !

@aokolnychyi aokolnychyi merged commit 1f8dbae into apache:master Aug 24, 2023
41 checks passed
@aokolnychyi
Copy link
Contributor Author

Thanks, @singhpk234 @szehon-ho!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants