Skip to content
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

[core] Add 5s timeout to the log and err subscriber polls. #44761

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rynewang
Copy link
Contributor

@rynewang rynewang commented Apr 16, 2024

In worker.py we have threads to poll logs and errors from GCS. These polls are forever and we experienced some hang on shutdown. Changing them to a 5s timeout. This is safe because if it's timed out, PythonGcsSubscriber::DoPoll returns OK with empty error/log, and the python polling threads print_logs and listen_error_messages just ignores it and retries.

Also added some type annotations just for better code.

Signed-off-by: Ruiyang Wang <rywang014@gmail.com>
Signed-off-by: Ruiyang Wang <rywang014@gmail.com>
@rynewang rynewang changed the title [core] Add 1s timeout to the log and err subscriber polls. [core] Add 5s timeout to the log and err subscriber polls. Apr 16, 2024
@rynewang
Copy link
Contributor Author

This can fix #44729 but I think it should not hang in the first place, since we called worker.gcs_log_subscriber.close() right before joining the logger thread. We can merge this, while I will look a bit more into why it hung.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants