Skip to content

Commit 3552891

Browse files
committed
doc errors and improve checks
Signed-off-by: Sagar Sumit <[email protected]>
1 parent ab59ff3 commit 3552891

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

src/ray/core_worker/core_worker.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1499,6 +1499,19 @@ class CoreWorker {
14991499
std::string *application_error);
15001500

15011501
/// Put an object in the local plasma store.
1502+
///
1503+
/// Return status semantics:
1504+
/// - Status::OK(): The object was created (or already existed) and bookkeeping was
1505+
/// updated. Note: an internal ObjectExists from the plasma provider is treated
1506+
/// as OK and does not surface here.
1507+
/// - Status::ObjectStoreFull(): The local plasma store is out of memory (or out of
1508+
/// disk when spilling). The error message contains context and a short memory
1509+
/// report.
1510+
/// - Status::IOError(): IPC/connection failures while talking to the plasma store
1511+
/// (e.g., broken pipe/connection reset during shutdown, store not reachable).
1512+
///
1513+
/// Call sites that run during shutdown may choose to tolerate IOError specifically,
1514+
/// but should treat all other statuses as real failures.
15021515
Status PutInLocalPlasmaStore(const RayObject &object,
15031516
const ObjectID &object_id,
15041517
bool pin_object);

src/ray/core_worker/core_worker_process.cc

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -424,20 +424,11 @@ std::shared_ptr<CoreWorker> CoreWorkerProcessImpl::CreateCoreWorker(
424424
[this](const RayObject &object, const ObjectID &object_id) {
425425
auto core_worker = GetCoreWorker();
426426

427-
// Check if the core worker is shutting down before attempting plasma operations.
428-
// During shutdown, the plasma store connection may already be broken, so we
429-
// should avoid plasma operations entirely.
430-
if (core_worker->IsShuttingDown()) {
431-
RAY_LOG(INFO) << "Skipping plasma store operation for error object "
432-
<< object_id << " because core worker is shutting down.";
433-
return;
434-
}
435-
436427
auto status =
437428
core_worker->PutInLocalPlasmaStore(object, object_id, /*pin_object=*/true);
438429
if (!status.ok()) {
439430
// During shutdown, plasma store connections can be closed causing IOError.
440-
// We only tolerate IOError during shutdown to avoid masking real errors.
431+
// Tolerate only IOError during shutdown to avoid masking real errors.
441432
if (status.IsIOError() && core_worker->IsShuttingDown()) {
442433
// Double-check shutdown state - this handles the race where shutdown
443434
// began after our first check but before the plasma operation.

0 commit comments

Comments
 (0)