Skip to content

Revert "[Data] Add configurable batching for resolve_block_refs to sp…#60114

Merged
alexeykudinkin merged 1 commit intoray-project:masterfrom
iamjustinhsu:jhsu/revert-iter-batch-gets
Jan 13, 2026
Merged

Revert "[Data] Add configurable batching for resolve_block_refs to sp…#60114
alexeykudinkin merged 1 commit intoray-project:masterfrom
iamjustinhsu:jhsu/revert-iter-batch-gets

Conversation

@iamjustinhsu
Copy link
Copy Markdown
Contributor

…eed up iter_batches (#58467)"

This reverts commit 2a042d4.

Description

Reverts # 58467

Related issues

Additional information

@iamjustinhsu iamjustinhsu requested a review from a team as a code owner January 13, 2026 21:13
…eed up iter_batches (ray-project#58467)"

This reverts commit 2a042d4.

Signed-off-by: iamjustinhsu <jhsu@anyscale.com>
@iamjustinhsu iamjustinhsu force-pushed the jhsu/revert-iter-batch-gets branch from 7d78ccd to bd662d6 Compare January 13, 2026 21:14
@iamjustinhsu iamjustinhsu added the go add ONLY when ready to merge, run all tests label Jan 13, 2026
Copy link
Copy Markdown
Contributor

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

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 reverts a previous change that introduced configurable batching for resolve_block_refs. The revert appears to be clean and complete, correctly removing the feature logic, configuration, and associated tests. I have one minor suggestion to improve code clarity and avoid redundant calls in iter_batches.py.

Comment on lines +136 to 144
self._eager_free = (
clear_block_after_read and DataContext.get_current().eager_free
)

actor_prefetcher_enabled = (
prefetch_batches > 0
and self._ctx.actor_prefetcher_enabled
and DataContext.get_current().actor_prefetcher_enabled
and not ray.util.client.ray.is_connected()
)
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.

medium

To avoid multiple calls to DataContext.get_current(), you could store the context in a local variable at the beginning of the method and reuse it. This improves readability and avoids repeated function calls.

        ctx = DataContext.get_current()
        self._eager_free = (
            clear_block_after_read and ctx.eager_free
        )

        actor_prefetcher_enabled = (
            prefetch_batches > 0
            and ctx.actor_prefetcher_enabled
            and not ray.util.client.ray.is_connected()
        )

@iamjustinhsu
Copy link
Copy Markdown
Contributor Author

iamjustinhsu commented Jan 13, 2026

Hey @YoussefEssDS, we had to revert this PR because the hurts performance when using WaitBlockPrefetcher. This is because we

  1. we wait for 1 block to be ready:ray.wait(blocks, num_returns=1)
  2. Then you grab all the blocks: ray.get(blocks), which means that this path will block until the last block is fetched delaying yielding of the blocks until the very last one loads.

If you have any questions, feel free to reach out. You can also join the external ray data slack channel and we chat over there too

@alexeykudinkin alexeykudinkin enabled auto-merge (squash) January 13, 2026 23:05
@alexeykudinkin alexeykudinkin merged commit 7e4092c into ray-project:master Jan 13, 2026
8 checks passed
@iamjustinhsu iamjustinhsu deleted the jhsu/revert-iter-batch-gets branch January 13, 2026 23:06
@iamjustinhsu iamjustinhsu mentioned this pull request Jan 13, 2026
rushikeshadhav pushed a commit to rushikeshadhav/ray that referenced this pull request Jan 14, 2026
ray-project#60114)

…eed up iter_batches (ray-project#58467)"

This reverts commit 2a042d4.

## Description
Reverts # 58467

## Related issues

## Additional information

Signed-off-by: iamjustinhsu <jhsu@anyscale.com>
jeffery4011 pushed a commit to jeffery4011/ray that referenced this pull request Jan 20, 2026
ray-project#60114)

…eed up iter_batches (ray-project#58467)"

This reverts commit 2a042d4.

## Description
Reverts # 58467

## Related issues

## Additional information

Signed-off-by: iamjustinhsu <jhsu@anyscale.com>
Signed-off-by: jeffery4011 <jefferyshen1015@gmail.com>
ryanaoleary pushed a commit to ryanaoleary/ray that referenced this pull request Feb 3, 2026
ray-project#60114)

…eed up iter_batches (ray-project#58467)"

This reverts commit 2a042d4.

## Description
Reverts # 58467

## Related issues

## Additional information

Signed-off-by: iamjustinhsu <jhsu@anyscale.com>
peterxcli pushed a commit to peterxcli/ray that referenced this pull request Feb 25, 2026
ray-project#60114)

…eed up iter_batches (ray-project#58467)"

This reverts commit 2a042d4.

## Description
Reverts # 58467

## Related issues

## Additional information

Signed-off-by: iamjustinhsu <jhsu@anyscale.com>
Signed-off-by: peterxcli <peterxcli@gmail.com>
peterxcli pushed a commit to peterxcli/ray that referenced this pull request Feb 25, 2026
ray-project#60114)

…eed up iter_batches (ray-project#58467)"

This reverts commit 2a042d4.

## Description
Reverts # 58467

## Related issues

## Additional information

Signed-off-by: iamjustinhsu <jhsu@anyscale.com>
Signed-off-by: peterxcli <peterxcli@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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