-
Notifications
You must be signed in to change notification settings - Fork 326
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
Improve wait_actor_pool_recovered #2328
Conversation
if self._auto_recover and message.address not in self._recover_events: | ||
self._recover_events[message.address] = asyncio.Event() | ||
if self._auto_recover and message.address not in self._recover_events: | ||
self._recover_events[message.address] = asyncio.Event() |
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.
I think one single event object plus a lock is enough. Recover event is created during pool initialization and replaced with a new event object every time when a monitor loop finishes.
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.
LGTM
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.
LGTM
(cherry picked from commit 2fb00d8)
(cherry picked from commit 2fb00d8)
What do these changes do?
This PR enhances reliability of wait_actor_pool_recovered and avoid waiting forever. The changes are small and the ideas are below:
This PR also adds tests for auto-recover and server-closed for ray as mars pool does.
Related issue number
Resolve #2320