-
Notifications
You must be signed in to change notification settings - Fork 7k
[core] Make PinObjectIDs RPC Fault Tolerant #56443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b218989
9c7b2ca
0935b79
e830c59
29ceada
02ee84c
96efd2c
7bb929b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -71,13 +71,19 @@ class FakePlasmaClient : public PlasmaClientInterface { | |||||
| Status Get(const std::vector<ObjectID> &object_ids, | ||||||
| int64_t timeout_ms, | ||||||
| std::vector<plasma::ObjectBuffer> *object_buffers) override { | ||||||
| object_buffers->reserve(object_ids.size()); | ||||||
| for (const auto &id : object_ids) { | ||||||
| auto &buffers = objects_in_plasma_[id]; | ||||||
| plasma::ObjectBuffer shm_buffer{std::make_shared<SharedMemoryBuffer>( | ||||||
| buffers.first.data(), buffers.first.size()), | ||||||
| std::make_shared<SharedMemoryBuffer>( | ||||||
| buffers.second.data(), buffers.second.size())}; | ||||||
| object_buffers->emplace_back(shm_buffer); | ||||||
| if (objects_in_plasma_.contains(id)) { | ||||||
| auto &buffers = objects_in_plasma_[id]; | ||||||
| plasma::ObjectBuffer shm_buffer{ | ||||||
| std::make_shared<SharedMemoryBuffer>(buffers.first.data(), | ||||||
| buffers.first.size()), | ||||||
| std::make_shared<SharedMemoryBuffer>(buffers.second.data(), | ||||||
| buffers.second.size())}; | ||||||
| object_buffers->emplace_back(shm_buffer); | ||||||
| } else { | ||||||
| object_buffers->emplace_back(plasma::ObjectBuffer{}); | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. prod version does this as well: ray/src/ray/object_manager/plasma/client.cc Line 631 in 0c62bdb
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/src/ray/raylet/node_manager.cc Line 2421 in 0c62bdb
TLDR: it uses these dummy default values to detect what objects are not in plasma
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do we need the change for this test though?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||||||
| } | ||||||
| } | ||||||
| return Status::OK(); | ||||||
| } | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.