Skip to content

[Data] Propagate isolate_read_workers to DatasourceV2 - #65191

Merged
bveeramani merged 2 commits into
masterfrom
propogate-datasource-v2-isolate-read-works
Aug 4, 2026
Merged

bveeramani merged 2 commits into
masterfrom
propogate-datasource-v2-isolate-read-works

Conversation

@bveeramani

Copy link
Copy Markdown
Member

#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.

In this PR, I'm fixing the bug and also adding a regression test.

Signed-off-by: Balaji Veeramani <[email protected]>
@bveeramani
bveeramani requested a review from a team as a code owner August 4, 2026 02:36

@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 e3413a2. Configure here.

Comment thread python/ray/data/tests/test_map.py Resolved

@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 the isolate_read_workers setting from DataContext to the ReadFiles physical operator and adds a unit test to verify this propagation. However, an accidental assert False statement was left in an existing test in python/ray/data/tests/test_map.py, which will cause test failures 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

The assert False statement was likely added during debugging and will cause test_downstream_operators_scheduled_on_different_workers_than_read_workers to unconditionally fail in CI. This assertion should be removed.

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.

+1

@ray-gardener ray-gardener Bot added the data Ray Data-related issues label Aug 4, 2026
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.

+1

@bveeramani
bveeramani enabled auto-merge (squash) August 4, 2026 17:27
@github-actions github-actions Bot added the go add ONLY when ready to merge, run all tests label Aug 4, 2026
Signed-off-by: Balaji Veeramani <[email protected]>
elliot-barn added a commit that referenced this pull request Aug 4, 2026
…V2 (#65191) (#65207)

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](https://claude.com/claude-code)

---------

Signed-off-by: elliot-barn <[email protected]>
Co-authored-by: Balaji Veeramani <[email protected]>
Co-authored-by: Claude Fable 5 <[email protected]>
@github-actions
github-actions Bot disabled auto-merge August 4, 2026 19:25
@bveeramani
bveeramani enabled auto-merge (squash) August 4, 2026 19:26
@bveeramani
bveeramani merged commit 8e8194c into master Aug 4, 2026
4 checks passed
@bveeramani
bveeramani deleted the propogate-datasource-v2-isolate-read-works branch August 4, 2026 20:32
Artimislyy pushed a commit to Artimislyy/ray that referenced this pull request Aug 11, 2026
…65191)

ray-project#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`.

In this PR, I'm fixing the bug and also adding a regression test.

---------

Signed-off-by: Balaji Veeramani <[email protected]>
400Ping pushed a commit to 400Ping/ray that referenced this pull request Aug 18, 2026
…65191)

ray-project#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`.

In this PR, I'm fixing the bug and also adding a regression test.

---------

Signed-off-by: Balaji Veeramani <[email protected]>
Signed-off-by: 400Ping <[email protected]>
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
…65191)

ray-project#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`.

In this PR, I'm fixing the bug and also adding a regression test.

---------

Signed-off-by: Balaji Veeramani <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data Ray Data-related issues go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants