[Core] Make worker_register_timeout_seconds configurable (#9221)

This commit is contained in:
yncxcw
2020-07-07 18:27:15 -05:00
committed by GitHub
parent 8f19f1eafb
commit 4ba4110dec
4 changed files with 14 additions and 3 deletions
+4
View File
@@ -192,6 +192,10 @@ RAY_CONFIG(size_t, raylet_max_active_object_ids, 0)
/// the worker SIGKILL.
RAY_CONFIG(int64_t, kill_worker_timeout_milliseconds, 100)
/// The duration that we wait after the worekr is launched before the
/// starting_worker_timeout_callback() is called.
RAY_CONFIG(int64_t, worker_register_timeout_seconds, 30)
/// This is a timeout used to cause failures in the plasma manager and raylet
/// when certain event loop handlers take too long.
RAY_CONFIG(int64_t, max_time_for_handler_milliseconds, 1000)
+2 -2
View File
@@ -250,9 +250,9 @@ Process WorkerPool::StartWorkerProcess(const Language &language,
void WorkerPool::MonitorStartingWorkerProcess(const Process &proc,
const Language &language) {
constexpr static size_t worker_register_timeout_seconds = 30;
auto timer = std::make_shared<boost::asio::deadline_timer>(
*io_service_, boost::posix_time::seconds(worker_register_timeout_seconds));
*io_service_, boost::posix_time::seconds(
RayConfig::instance().worker_register_timeout_seconds()));
// Capture timer in lambda to copy it once, so that it can avoid destructing timer.
timer->async_wait(
[timer, language, proc, this](const boost::system::error_code e) -> void {