Skip to content

Fix(athena): Drop partitions in batches of 25#3488

Merged
erindru merged 2 commits intomainfrom
erin/fix-athena-drop-partition
Dec 9, 2024
Merged

Fix(athena): Drop partitions in batches of 25#3488
erindru merged 2 commits intomainfrom
erin/fix-athena-drop-partition

Conversation

@erindru
Copy link
Collaborator

@erindru erindru commented Dec 8, 2024

Prior to this change, if the Athena adapter needed to replace more than 25 partitions in a partitioned model, the following boto3 error would occur:

'partitionsToDelete' failed to satisfy constraint: Member must have length less than or
equal to 25

This PR changes the adapter to call batch_delete_partition in batches of 25, which is the maximum number allowed at once.

Note that it's just a dumb loop, technically it could be called in parallel from multiple worker threads to reduce latency if there are a lot of partitions to drop but we could add that later if it turns out to be a problem

branches:
only:
- main
#filters:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

TODO: revert prior to merge

@erindru erindru merged commit 5fede98 into main Dec 9, 2024
@erindru erindru deleted the erin/fix-athena-drop-partition branch December 9, 2024 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants