-
Notifications
You must be signed in to change notification settings - Fork 105
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
Add graceful shutdown to worker instances #1394
base: main
Are you sure you want to change the base?
Add graceful shutdown to worker instances #1394
Conversation
97ca5f4
to
b34eaf4
Compare
b34eaf4
to
3eb360b
Compare
3eb360b
to
0dd8596
Compare
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.
Reviewed 3 of 6 files at r1, all commit messages.
Reviewable status: 0 of 1 LGTMs obtained, and 3 of 6 files reviewed, and 3 discussions need to be resolved
nativelink-worker/src/local_worker.rs
line 486 at r1 (raw file):
pub async fn shutdown(&self) { println!("Shutting down worker: {}", self.name());
should be a tracing log statement and not println statements, for example
nativelink/nativelink-util/src/common.rs
Line 237 in 553f33c
event!( |
nativelink-worker/src/local_worker.rs
line 488 at r1 (raw file):
println!("Shutting down worker: {}", self.name()); let max_wait_duration = Duration::from_secs(60);
I think this would be better named as a shutdown deadline and a configuration option. I wonder if this would get out of sync with request timeouts and cause hard to catch behavior if shorter than upstream timeouts.
nativelink-worker/src/local_worker.rs
line 525 at r1 (raw file):
} else { println!("No worker_id available; cannot notify scheduler."); return;
This would be panic or return Err / make_err type situation
Description
This PR implements graceful shutdown for worker instances to ensure that the scheduler is properly notified when workers are shutting down.
How Has This Been Tested?
bazel test ...
Checklist
bazel test //...
passes locallygit amend
see some docsThis change is