mirror of
https://github.com/wassname/ray.git
synced 2026-07-18 12:40:56 +08:00
[Core] Logging improvements (#10625)
* other stuff : * lint * . * . * lint * comment * lint * .
This commit is contained in:
@@ -301,8 +301,8 @@ bool TaskManager::PendingTaskFailed(const TaskID &task_id, rpc::ErrorType error_
|
||||
if (num_retries_left != 0) {
|
||||
auto retries_str =
|
||||
num_retries_left == -1 ? "infinite" : std::to_string(num_retries_left);
|
||||
RAY_LOG(ERROR) << retries_str << " retries left for task " << spec.TaskId()
|
||||
<< ", attempting to resubmit.";
|
||||
RAY_LOG(INFO) << retries_str << " retries left for task " << spec.TaskId()
|
||||
<< ", attempting to resubmit.";
|
||||
retry_task_callback_(spec, /*delay=*/true);
|
||||
will_retry = true;
|
||||
} else {
|
||||
@@ -315,8 +315,8 @@ bool TaskManager::PendingTaskFailed(const TaskID &task_id, rpc::ErrorType error_
|
||||
(current_time_ms() - last_log_time_ms_) >
|
||||
kTaskFailureLoggingFrequencyMillis)) {
|
||||
if (num_failure_logs_++ == kTaskFailureThrottlingThreshold) {
|
||||
RAY_LOG(ERROR) << "Too many failure logs, throttling to once every "
|
||||
<< kTaskFailureLoggingFrequencyMillis << " millis.";
|
||||
RAY_LOG(WARNING) << "Too many failure logs, throttling to once every "
|
||||
<< kTaskFailureLoggingFrequencyMillis << " millis.";
|
||||
}
|
||||
last_log_time_ms_ = current_time_ms();
|
||||
if (status != nullptr) {
|
||||
|
||||
@@ -2242,11 +2242,11 @@ void NodeManager::MarkObjectsAsFailed(
|
||||
// If we failed to save the error code, log a warning and push an error message
|
||||
// to the driver.
|
||||
std::ostringstream stream;
|
||||
stream << "An plasma error (" << status.ToString() << ") occurred while saving"
|
||||
stream << "A plasma error (" << status.ToString() << ") occurred while saving"
|
||||
<< " error code to object " << object_id << ". Anyone who's getting this"
|
||||
<< " object may hang forever.";
|
||||
std::string error_message = stream.str();
|
||||
RAY_LOG(WARNING) << error_message;
|
||||
RAY_LOG(ERROR) << error_message;
|
||||
auto error_data_ptr =
|
||||
gcs::CreateErrorTableData("task", error_message, current_time_ms(), job_id);
|
||||
RAY_CHECK_OK(gcs_client_->Errors().AsyncReportJobError(error_data_ptr, nullptr));
|
||||
|
||||
@@ -387,9 +387,15 @@ Process WorkerPool::StartProcess(const std::vector<std::string> &worker_command_
|
||||
argv.push_back(NULL);
|
||||
Process child(argv.data(), io_service_, ec, /*decouple=*/false, env);
|
||||
if (!child.IsValid() || ec) {
|
||||
// The worker failed to start. This is a fatal error.
|
||||
RAY_LOG(FATAL) << "Failed to start worker with return value " << ec << ": "
|
||||
<< ec.message();
|
||||
// errorcode 24: Too many files. This is caused by ulimit.
|
||||
if (ec.value() == 24) {
|
||||
RAY_LOG(FATAL) << "Too many workers, failed to create a file. Try setting "
|
||||
<< "`ulimit -n <num_files>` then restart Ray.";
|
||||
} else {
|
||||
// The worker failed to start. This is a fatal error.
|
||||
RAY_LOG(FATAL) << "Failed to start worker with return value " << ec << ": "
|
||||
<< ec.message();
|
||||
}
|
||||
}
|
||||
return child;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user