Skip to content

[release/2.57.0][Data] Propagate isolate_read_workers to DatasourceV2 (#65191) - #65207

Merged
elliot-barn merged 2 commits into
releases/2.57.0from
elliot-barn/cherry-pick-2.57.0-isolate-read-workers-dsv2
Aug 4, 2026
Merged

elliot-barn merged 2 commits into
releases/2.57.0from
elliot-barn/cherry-pick-2.57.0-isolate-read-workers-dsv2

Conversation

@elliot-barn

Copy link
Copy Markdown
Collaborator

Cherry-pick of #65191 to releases/2.57.0.

Note: #65191 is still open on master at the time of this cherry-pick (picked from its head commit e3413a2). If it changes before merging to master, this PR should be updated to match.

Original description

#63490 added a setting, isolate_read_workers, to run reads on dedicated worker processes. The intention was to mitigate memory bloat from PyArrow from affecting downstream stages.

The PR only added a test with Datasource (V1), but not with DatasourceV2. As a result, we've shipped a bug where the flag doesn't work correctly with DatasourceV2.

This PR fixes the bug and also adds a regression test.

🤖 Generated with Claude Code

#63490 added a setting, `isolate_read_workers`, to run reads on dedicated worker processes. The intention was to mitigate memory bloat from PyArrow from affecting downstream stages.

The PR only added a test with `Datasource` (V1), but not with `DatasourceV2`. As a result, we've shipped a bug where the flag doesn't work correctly with `DatasourceV2`.

This PR fixes the bug and also adds a regression test.

Signed-off-by: elliot-barn <[email protected]>
@elliot-barn
elliot-barn requested a review from a team as a code owner August 4, 2026 17:38

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request propagates DataContext.isolate_read_workers to the ReadFiles physical operator for Datasource V2 and adds a unit test to verify this behavior. However, a leftover assert False debugging statement was introduced in python/ray/data/tests/test_map.py which will cause the test to fail and should be removed.

Comment thread python/ray/data/tests/test_map.py Outdated
ray.data.read_datasource(SetMarkerDatasource()).map(
check_marker_not_set
).materialize()
assert False

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

This assert False appears to be a leftover debugging statement. It will cause test_downstream_operators_scheduled_on_different_workers_than_read_workers to always fail when the test completes successfully. Please remove this line.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0ed2ef0. Configure here.

Comment thread python/ray/data/tests/test_map.py Resolved
Co-Authored-By: Claude Fable 5 <[email protected]>
Signed-off-by: elliot-barn <[email protected]>
@elliot-barn
elliot-barn merged commit 4464bbb into releases/2.57.0 Aug 4, 2026
3 checks passed
@elliot-barn
elliot-barn deleted the elliot-barn/cherry-pick-2.57.0-isolate-read-workers-dsv2 branch August 4, 2026 18:29
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