Skip to content

Commit 4d0392c

Browse files
committed
fixups
Signed-off-by: Pablo E <pabloem@apache.org>
1 parent ae7a039 commit 4d0392c

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

python/ray/_raylet.pyx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ cdef int check_status(const CRayStatus& status) nogil except -1:
200200
raise ValueError(message)
201201
elif status.IsObjectNotFound():
202202
raise ValueError(message)
203+
elif status.IsObjectUnknownOwner():
204+
raise ValueError(message)
203205
else:
204206
raise RaySystemError(message)
205207

python/ray/includes/common.pxd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ cdef extern from "ray/common/status.h" namespace "ray" nogil:
115115
c_bool ShouldExitWorker()
116116
c_bool IsObjectNotFound()
117117
c_bool IsNotFound()
118+
c_bool IsObjectUnknownOwner()
118119

119120
c_string ToString()
120121
c_string CodeAsString()

python/ray/tests/test_ray_shutdown.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def f(s):
7070
ray.shutdown()
7171

7272
ray.init(num_cpus=1, include_dashboard=False)
73-
with pytest.raises(ValueError, match="a Ray object whose owner is unknown"):
73+
with pytest.raises(ValueError, match="Ray object whose owner is unknown"):
7474
f.remote(my_ref) # This would cause full CPython death.
7575

7676
ray.shutdown()
@@ -92,7 +92,7 @@ def f(s):
9292
ray.shutdown()
9393

9494
ray.init(num_cpus=1, include_dashboard=False)
95-
with pytest.raises(ValueError, match="a Ray object whose owner is unknown"):
95+
with pytest.raises(ValueError, match="Ray object whose owner is unknown"):
9696
f.remote([my_ref]) # This would cause full CPython death.
9797

9898
ray.shutdown()
@@ -110,7 +110,7 @@ def test_ray_shutdown_then_get(short_gcs_publish_timeout, shutdown_only):
110110
ray.shutdown()
111111

112112
ray.init(num_cpus=1, include_dashboard=False)
113-
with pytest.raises(ValueError, match="a Ray object whose owner is unknown"):
113+
with pytest.raises(ValueError, match="Ray objects whose owner is unknown"):
114114
# This used to cause ray to hang indefinitely (without timeout) or
115115
# throw a timeout exception if a timeout was provided. Now it is expected to
116116
# throw an exception reporting the unknown object.
@@ -137,7 +137,7 @@ def test_ray_shutdown_then_wait(short_gcs_publish_timeout, shutdown_only):
137137
# function to wait for the valid references; however, if all the
138138
# references are unknown, we expect an error.
139139
ready, not_ready = ray.wait([my_new_ref, my_ref])
140-
with pytest.raises(ValueError, match="a Ray object whose owner is unknown"):
140+
with pytest.raises(ValueError, match="Ray object whose owner is unknown"):
141141
# This used to cause ray to hang indefinitely (without timeout) or
142142
# forever return all tasks as not-ready if a timeout was provided.
143143
# Now it is expected to throw an exception reporting if all objects are

src/ray/common/status.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ class RAY_EXPORT Status {
269269
bool IsSchedulingCancelled() const { return code() == StatusCode::SchedulingCancelled; }
270270
bool IsObjectExists() const { return code() == StatusCode::ObjectExists; }
271271
bool IsObjectNotFound() const { return code() == StatusCode::ObjectNotFound; }
272+
bool IsObjectUnknownOwner() const { return code() == StatusCode::ObjectUnknownOwner; }
272273
bool IsObjectAlreadySealed() const { return code() == StatusCode::ObjectAlreadySealed; }
273274
bool IsObjectStoreFull() const { return code() == StatusCode::ObjectStoreFull; }
274275
bool IsTransientObjectStoreFull() const {

0 commit comments

Comments
 (0)