Skip to content

Conversation

@Sparks0219
Copy link
Contributor

@Sparks0219 Sparks0219 commented Sep 11, 2025

Why are these changes needed?

Making PinObjectIDs RPC fault tolerant. Added cpp unit tests to verify idempotency.

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

@Sparks0219 Sparks0219 requested a review from a team as a code owner September 11, 2025 05:26
@Sparks0219 Sparks0219 added the go add ONLY when ready to merge, run all tests label Sep 11, 2025
Copy link
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 makes the PinObjectIDs RPC fault-tolerant by switching to a retryable RPC client. To support this, new unit tests have been added to verify the idempotency of the HandlePinObjectIDs handler. The changes look correct and well-tested. My main feedback is to refactor the new tests to reduce code duplication.

@ray-gardener ray-gardener bot added the core Issues that should be addressed in Ray Core label Sep 11, 2025
@Sparks0219 Sparks0219 requested a review from dayshah September 12, 2025 23:10
Signed-off-by: joshlee <[email protected]>
Signed-off-by: joshlee <[email protected]>
buffers.second.size())};
object_buffers->emplace_back(shm_buffer);
} else {
object_buffers->emplace_back(plasma::ObjectBuffer{});
Copy link
Contributor

Choose a reason for hiding this comment

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

why the change to emplace in the buffer even if the obj isn't there in fake plasma client?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

prod version does this as well:

*out = std::vector<ObjectBuffer>(num_objects);

by resizing the vector then skipping over indices that don't contain. Hence not emplacing caused issues with testing since it varied from the test causing RAY_CHECK failure here:
RAY_CHECK_EQ(object_ids.size(), results.size());

TLDR: it uses these dummy default values to detect what objects are not in plasma

Copy link
Contributor

Choose a reason for hiding this comment

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

why do we need the change for this test though?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The PinObjectIDs test also test the not happy path where we try to pin an object that doesn't exist which will trigger the RAY_CHECK in node_manager.cc I linked above

@Sparks0219 Sparks0219 requested a review from dayshah September 16, 2025 21:20
Signed-off-by: joshlee <[email protected]>
@edoakes edoakes merged commit 7c28be2 into ray-project:master Sep 17, 2025
5 checks passed
@Sparks0219 Sparks0219 deleted the joshlee/pin-object-ids-fault-tolerance branch September 17, 2025 19:33
zma2 pushed a commit to zma2/ray that referenced this pull request Sep 23, 2025
Making PinObjectIDs RPC fault tolerant. Added cpp unit tests to verify
idempotency.

---------

Signed-off-by: joshlee <[email protected]>
Signed-off-by: Zhiqiang Ma <[email protected]>
ZacAttack pushed a commit to ZacAttack/ray that referenced this pull request Sep 24, 2025
Making PinObjectIDs RPC fault tolerant. Added cpp unit tests to verify
idempotency.

---------

Signed-off-by: joshlee <[email protected]>
Signed-off-by: zac <[email protected]>
elliot-barn pushed a commit that referenced this pull request Sep 24, 2025
Making PinObjectIDs RPC fault tolerant. Added cpp unit tests to verify
idempotency.

---------

Signed-off-by: joshlee <[email protected]>
Signed-off-by: elliot-barn <[email protected]>
marcostephan pushed a commit to marcostephan/ray that referenced this pull request Sep 24, 2025
Making PinObjectIDs RPC fault tolerant. Added cpp unit tests to verify
idempotency.

---------

Signed-off-by: joshlee <[email protected]>
Signed-off-by: Marco Stephan <[email protected]>
elliot-barn pushed a commit that referenced this pull request Sep 27, 2025
Making PinObjectIDs RPC fault tolerant. Added cpp unit tests to verify
idempotency.

---------

Signed-off-by: joshlee <[email protected]>
Signed-off-by: elliot-barn <[email protected]>
dstrodtman pushed a commit to dstrodtman/ray that referenced this pull request Oct 6, 2025
Making PinObjectIDs RPC fault tolerant. Added cpp unit tests to verify
idempotency.

---------

Signed-off-by: joshlee <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
justinyeh1995 pushed a commit to justinyeh1995/ray that referenced this pull request Oct 20, 2025
Making PinObjectIDs RPC fault tolerant. Added cpp unit tests to verify
idempotency.

---------

Signed-off-by: joshlee <[email protected]>
landscapepainter pushed a commit to landscapepainter/ray that referenced this pull request Nov 17, 2025
Making PinObjectIDs RPC fault tolerant. Added cpp unit tests to verify
idempotency.

---------

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

Labels

core Issues that should be addressed in Ray Core go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants