-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
Fix global_state not disconnected after ray.shutdown #4354
Fix global_state not disconnected after ray.shutdown #4354
Conversation
Can one of the admins verify this patch? |
Test FAILed. |
python/ray/worker.py
Outdated
@@ -2088,6 +2088,9 @@ def disconnect(): | |||
if hasattr(worker, "plasma_client"): | |||
worker.plasma_client.disconnect() | |||
|
|||
# Disconnect global state from GCS. | |||
global_state.disconnect() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better put this in shutdown
, because global_state
isn't part of the worker
Test FAILed. |
Test FAILed. |
python/ray/tests/test_basic.py
Outdated
|
||
|
||
def test_shutdown_disconnect_global_state(): | ||
ray.init() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ray.init() | |
ray.init(num_cpus=0) |
python/ray/worker.py
Outdated
@@ -2054,7 +2057,7 @@ def connect(info, | |||
|
|||
|
|||
def disconnect(): | |||
"""Disconnect this worker from the scheduler and object store.""" | |||
"""Disconnect this worker from the raylet and object store""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"""Disconnect this worker from the raylet and object store""" | |
"""Disconnect this worker from the raylet and object store.""" |
I'm surprised that Travis ran the Java tests.. it shouldn't have done that for this PR. |
Test PASSed. |
Test PASSed. |
Thanks @jovany-wang! |
What do these changes do?
Considering this script:
It throws a
ConnectionRefusedError
error. Worse,_check_connected ()
will pass.