Skip to content

[data][2/n] Ordered + FIFO bundle queue#60228

Merged
alexeykudinkin merged 13 commits intoray-project:masterfrom
iamjustinhsu:jhsu/unify-internal-queue-abstraction-add-fifo-and-ordered2
Jan 24, 2026
Merged

[data][2/n] Ordered + FIFO bundle queue#60228
alexeykudinkin merged 13 commits intoray-project:masterfrom
iamjustinhsu:jhsu/unify-internal-queue-abstraction-add-fifo-and-ordered2

Conversation

@iamjustinhsu
Copy link
Copy Markdown
Contributor

@iamjustinhsu iamjustinhsu commented Jan 16, 2026

Description

Moves OrderedBundleQueue to bundle_queue/ directory, and rebases off of the BaseBundleQueue class. Creates a FIFOBundleQueue for simple ref bundle queues.

Old PR: #59093

There are about ~400 lines of tests, so not actually that big

Related issues

Additional information

Signed-off-by: iamjustinhsu <jhsu@anyscale.com>
@iamjustinhsu iamjustinhsu requested a review from a team as a code owner January 16, 2026 18:22
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 refactors the bundle queue logic by introducing OrderedBundleQueue and FIFOBundleQueue based on a common BaseBundleQueue. The changes are mostly clean and improve the structure of the code. However, I've found a few critical issues where methods are called on queue objects that are not implemented, which will lead to runtime errors. Please see the detailed comments for specifics.

Signed-off-by: iamjustinhsu <jhsu@anyscale.com>
cursor[bot]

This comment was marked as outdated.

@ray-gardener ray-gardener bot added the data Ray Data-related issues label Jan 16, 2026
Signed-off-by: iamjustinhsu <jhsu@anyscale.com>
@iamjustinhsu iamjustinhsu changed the title [data] Ordered + FIFO bundle queue [data][2/n] Ordered + FIFO bundle queue Jan 16, 2026
cursor[bot]

This comment was marked as outdated.

Signed-off-by: iamjustinhsu <jhsu@anyscale.com>
cursor[bot]

This comment was marked as outdated.

Signed-off-by: iamjustinhsu <jhsu@anyscale.com>
@iamjustinhsu iamjustinhsu added go add ONLY when ready to merge, run all tests and removed go add ONLY when ready to merge, run all tests labels Jan 16, 2026
Signed-off-by: iamjustinhsu <jhsu@anyscale.com>
Signed-off-by: iamjustinhsu <jhsu@anyscale.com>
Copy link
Copy Markdown

@cursor cursor bot left a comment

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 and found 1 potential issue.

Signed-off-by: iamjustinhsu <jhsu@anyscale.com>
Signed-off-by: iamjustinhsu <jhsu@anyscale.com>
…/unify-internal-queue-abstraction-add-fifo-and-ordered2
Signed-off-by: iamjustinhsu <jhsu@anyscale.com>
Signed-off-by: iamjustinhsu <jhsu@anyscale.com>
from ray.data._internal.execution.interfaces import RefBundle


class OrderedBundleQueue(BaseBundleQueue):
Copy link
Copy Markdown
Contributor Author

@iamjustinhsu iamjustinhsu Jan 22, 2026

Choose a reason for hiding this comment

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

Moved from map_operator.py and renamed to _OrderedOutputQueue

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.

Let's name it ReorderingBundleQueue (b/c all queues are ordered)

from ray.data._internal.execution.interfaces import RefBundle


class OrderedBundleQueue(BaseBundleQueue):
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.

Let's name it ReorderingBundleQueue (b/c all queues are ordered)

Signed-off-by: iamjustinhsu <jhsu@anyscale.com>
@iamjustinhsu iamjustinhsu added the go add ONLY when ready to merge, run all tests label Jan 23, 2026
@alexeykudinkin alexeykudinkin merged commit db06618 into ray-project:master Jan 24, 2026
7 checks passed
xinyuangui2 pushed a commit to xinyuangui2/ray that referenced this pull request Jan 26, 2026
## Description
Moves OrderedBundleQueue to `bundle_queue/` directory, and rebases off
of the `BaseBundleQueue` class. Creates a `FIFOBundleQueue` for simple
ref bundle queues.

Old PR: ray-project#59093

There are about ~400 lines of tests, so not actually that big

## Related issues

## Additional information

---------

Signed-off-by: iamjustinhsu <jhsu@anyscale.com>
bveeramani added a commit that referenced this pull request Jan 27, 2026
…eue` (#60538)

#60017 and
#60228 refactored the
`FIFOBundleQueue` interface and renamed `FIFOBundleQueue.popleft` with
`FIFOBundleQueue.get_next`. However, this name change wasn't reflected
in the `UnionOperator` implementation, and as a result the operator can
error when it clears its output queue.

This change also fixes the flaky `test_union.py`.

Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
jinbum-kim pushed a commit to jinbum-kim/ray that referenced this pull request Jan 29, 2026
## Description
Moves OrderedBundleQueue to `bundle_queue/` directory, and rebases off
of the `BaseBundleQueue` class. Creates a `FIFOBundleQueue` for simple
ref bundle queues.

Old PR: ray-project#59093

There are about ~400 lines of tests, so not actually that big

## Related issues

## Additional information

---------

Signed-off-by: iamjustinhsu <jhsu@anyscale.com>
Signed-off-by: jinbum-kim <jinbum9958@gmail.com>
jinbum-kim pushed a commit to jinbum-kim/ray that referenced this pull request Jan 29, 2026
…eue` (ray-project#60538)

ray-project#60017 and
ray-project#60228 refactored the
`FIFOBundleQueue` interface and renamed `FIFOBundleQueue.popleft` with
`FIFOBundleQueue.get_next`. However, this name change wasn't reflected
in the `UnionOperator` implementation, and as a result the operator can
error when it clears its output queue.

This change also fixes the flaky `test_union.py`.

Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
Signed-off-by: jinbum-kim <jinbum9958@gmail.com>
limarkdcunha pushed a commit to limarkdcunha/ray that referenced this pull request Jan 29, 2026
…eue` (ray-project#60538)

ray-project#60017 and
ray-project#60228 refactored the
`FIFOBundleQueue` interface and renamed `FIFOBundleQueue.popleft` with
`FIFOBundleQueue.get_next`. However, this name change wasn't reflected
in the `UnionOperator` implementation, and as a result the operator can
error when it clears its output queue.

This change also fixes the flaky `test_union.py`.

Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
400Ping pushed a commit to 400Ping/ray that referenced this pull request Feb 1, 2026
## Description
Moves OrderedBundleQueue to `bundle_queue/` directory, and rebases off
of the `BaseBundleQueue` class. Creates a `FIFOBundleQueue` for simple
ref bundle queues.

Old PR: ray-project#59093

There are about ~400 lines of tests, so not actually that big

## Related issues

## Additional information

---------

Signed-off-by: iamjustinhsu <jhsu@anyscale.com>
Signed-off-by: 400Ping <jiekaichang@apache.org>
400Ping pushed a commit to 400Ping/ray that referenced this pull request Feb 1, 2026
…eue` (ray-project#60538)

ray-project#60017 and
ray-project#60228 refactored the
`FIFOBundleQueue` interface and renamed `FIFOBundleQueue.popleft` with
`FIFOBundleQueue.get_next`. However, this name change wasn't reflected
in the `UnionOperator` implementation, and as a result the operator can
error when it clears its output queue.

This change also fixes the flaky `test_union.py`.

Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
Signed-off-by: 400Ping <jiekaichang@apache.org>
ans9868 pushed a commit to ans9868/ray that referenced this pull request Feb 18, 2026
…eue` (ray-project#60538)

ray-project#60017 and
ray-project#60228 refactored the
`FIFOBundleQueue` interface and renamed `FIFOBundleQueue.popleft` with
`FIFOBundleQueue.get_next`. However, this name change wasn't reflected
in the `UnionOperator` implementation, and as a result the operator can
error when it clears its output queue.

This change also fixes the flaky `test_union.py`.

Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
Signed-off-by: Adel Nour <ans9868@nyu.edu>
peterxcli pushed a commit to peterxcli/ray that referenced this pull request Feb 25, 2026
## Description
Moves OrderedBundleQueue to `bundle_queue/` directory, and rebases off
of the `BaseBundleQueue` class. Creates a `FIFOBundleQueue` for simple
ref bundle queues.

Old PR: ray-project#59093

There are about ~400 lines of tests, so not actually that big

## 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
…eue` (ray-project#60538)

ray-project#60017 and
ray-project#60228 refactored the
`FIFOBundleQueue` interface and renamed `FIFOBundleQueue.popleft` with
`FIFOBundleQueue.get_next`. However, this name change wasn't reflected
in the `UnionOperator` implementation, and as a result the operator can
error when it clears its output queue.

This change also fixes the flaky `test_union.py`.

Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
Signed-off-by: peterxcli <peterxcli@gmail.com>
peterxcli pushed a commit to peterxcli/ray that referenced this pull request Feb 25, 2026
## Description
Moves OrderedBundleQueue to `bundle_queue/` directory, and rebases off
of the `BaseBundleQueue` class. Creates a `FIFOBundleQueue` for simple
ref bundle queues.

Old PR: ray-project#59093

There are about ~400 lines of tests, so not actually that big

## 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
…eue` (ray-project#60538)

ray-project#60017 and
ray-project#60228 refactored the
`FIFOBundleQueue` interface and renamed `FIFOBundleQueue.popleft` with
`FIFOBundleQueue.get_next`. However, this name change wasn't reflected
in the `UnionOperator` implementation, and as a result the operator can
error when it clears its output queue.

This change also fixes the flaky `test_union.py`.

Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
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

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