fix: join Ray pools after closing#4751
Merged
chenghao-guo merged 1 commit intoMay 19, 2026
Merged
Conversation
Contributor
Author
|
@chenghao-guo Hi, could you help reviewing this PR when have free time? Thanks very much!!! |
9e7fde3 to
b35d1c5
Compare
b35d1c5 to
be9ec7b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pool.join()afterpool.close()in the Ray Pool cleanup paths for distributed indexing,add_columns, and compaction.Why
ray.util.multiprocessing.Poolfollows the multiprocessing-style lifecycle:close()prevents new work and lets outstanding actor work finish, but it does not wait for the Pool actors to exit.join()is the call that waits for actors in a closed Pool to stop.These code paths already wait for
map_async(...).get()before returning results, so this does not change result collection semantics. It makes worker actor cleanup deterministic after successful and failed runs, reducing the chance of transient Ray actor/resource leftovers across repeated operations or tests.Validation
python -m py_compile lance_ray/index.py lance_ray/io.py lance_ray/compaction.py tests/test_vector_index_options.pypython -m pytest tests/test_vector_index_options.pyuv run --no-sync ruff check lance_ray/index.py tests/test_vector_index_options.pygit diff --check