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

Vacuum parallel delete is affected by AQE #810

Closed
Kimahriman opened this issue Oct 14, 2021 · 6 comments
Closed

Vacuum parallel delete is affected by AQE #810

Kimahriman opened this issue Oct 14, 2021 · 6 comments
Labels
acknowledged This issue has been read and acknowledged by Delta admins waiting for merge
Milestone

Comments

@Kimahriman
Copy link
Contributor

Currently the vacuum.parallelDelete.enabled flag uses the default shuffle partitions as the parallelism control for deleting, since it is the result of a join. However, when the adaptive query engine is enabled, this affects the partitioning of the join, and since it is purely on file metadata, the resulting shuffle is small and AQE will merge these to a very small number of partitions regardless of your default partition setting.

This wasn't a huge deal since AQE is disabled by default, but in Spark 3.2 it will be enabled by default so this will affect more people.

Possible solutions:

  • Log something if AQE is enabled saying it will affect the parallelism of the delete
  • Try to temporarily turn off AQE while doing the vacuum
  • Change the existing setting or add a new setting for exactly how many partitions you want, and just do a repartition before deleting to the count
@rahulsmahadev rahulsmahadev added the acknowledged This issue has been read and acknowledged by Delta admins label Oct 14, 2021
@rahulsmahadev
Copy link
Collaborator

Thanks for reporting this, do you want to work on the potential fix here ?

@tdas
Copy link
Contributor

tdas commented Oct 14, 2021

Yeah, I am inclined to simply turn off AQE and maintain the previous behavior. we can do a simple check.. if parallel delete is enabled, then disable AQE before starting the job.

@tdas tdas added this to the 1.1.0 milestone Oct 14, 2021
@Kimahriman
Copy link
Contributor Author

Yeah I can work on a fix, just wanted to get a consensus on the solution. I'll play around with disabling AQE for it

@tdas
Copy link
Contributor

tdas commented Oct 14, 2021

we are planning to make a delta 1.1 release soon since spark 3.2 is about to be released. so would be awesome if we are able to release with this fix.

@Kimahriman
Copy link
Contributor Author

I'll try to get figure it out quick, I want to upgrade asap too, glad to hear you are planning to support 3.2 quickly

@Kimahriman
Copy link
Contributor Author

Got something thrown together so let me know your thoughts. Verified locally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledged This issue has been read and acknowledged by Delta admins waiting for merge
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants