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

fix: partition evaluator thread safety #115

Merged
merged 1 commit into from
Nov 2, 2023
Merged

fix: partition evaluator thread safety #115

merged 1 commit into from
Nov 2, 2023

Conversation

skellys
Copy link
Contributor

@skellys skellys commented Oct 30, 2023

I found a thread safety bug where some unwanted partitions would make it past the partition filter. I found and tested this fix on a simple Iceberg table with one schema spec, 5 manifest files (so 5 threads used in the thread pool), and thousands of partitions.

I've also solved this with a thread local storage approach to create fewer _ExpressionEvaluator instances under the hood, but I didn't think that'd be worth the additional complexity, especially with per-thread cleanup.

TODO

  • discuss approach on how to test this in the test suite itself.

@rustyconover
Copy link
Contributor

Looks great to me Sean!

@Fokko Fokko added this to the PyIceberg 0.6.0 release milestone Nov 2, 2023
Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

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

This makes sense to me @skellys That's a great catch, and thanks for working on this 👍

@Fokko Fokko merged commit b40ee83 into apache:main Nov 2, 2023
6 checks passed
@skellys skellys deleted the fix/partition_evaluator_thread_safety branch November 2, 2023 13:03
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.

3 participants