Skip to content

Add more context on logs 3 files #52472

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions src/ray/core_worker/actor_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -205,23 +205,22 @@ void ActorManager::WaitForActorRefDeleted(
const auto actor_creation_return_id = ObjectID::ForActorHandle(actor_id);
if (!reference_counter_.SetObjectRefDeletedCallback(actor_creation_return_id,
callback)) {
RAY_LOG(DEBUG) << "ActorID reference already gone for " << actor_id;
RAY_LOG(DEBUG).WithField(actor_id) << "ActorID reference already gone";
callback(actor_creation_return_id);
}
}

void ActorManager::HandleActorStateNotification(const ActorID &actor_id,
const rpc::ActorTableData &actor_data) {
const auto &actor_state = rpc::ActorTableData::ActorState_Name(actor_data.state());
RAY_LOG(INFO) << "received notification on actor, state: " << actor_state
<< ", actor_id: " << actor_id
<< ", ip address: " << actor_data.address().ip_address()
<< ", port: " << actor_data.address().port() << ", worker_id: "
<< WorkerID::FromBinary(actor_data.address().worker_id())
<< ", raylet_id: " << NodeID::FromBinary(actor_data.address().raylet_id())
<< ", num_restarts: " << actor_data.num_restarts()
<< ", death context type="
<< gcs::GetActorDeathCauseString(actor_data.death_cause());
const auto worker_id = WorkerID::FromBinary(actor_data.address().worker_id());
const auto raylet_id = NodeID::FromBinary(actor_data.address().raylet_id());
RAY_LOG(INFO).WithField(actor_id).WithField(worker_id).WithField(raylet_id)
<< "received notification on actor, state: " << actor_state
<< ", ip address: " << actor_data.address().ip_address()
<< ", port: " << actor_data.address().port()
<< ", num_restarts: " << actor_data.num_restarts() << ", death context type="
<< gcs::GetActorDeathCauseString(actor_data.death_cause());
if (actor_data.preempted()) {
actor_task_submitter_.SetPreempted(actor_id);
}
Expand Down Expand Up @@ -333,8 +332,9 @@ void ActorManager::MarkActorKilledOrOutOfScope(

/// Invalidate named actor cache.
if (!actor_name.empty()) {
RAY_LOG(DEBUG) << "Actor name cache is invalidated for the actor of name "
<< actor_name << " namespace " << ray_namespace << " id " << actor_id;
RAY_LOG(DEBUG).WithField(actor_id)
<< "Actor name cache is invalidated for the actor of name " << actor_name
<< " namespace " << ray_namespace;
cached_actor_name_to_ids_.erase(GenerateCachedActorName(ray_namespace, actor_name));
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/ray/core_worker/common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ void SerializeReturnObject(const ObjectID &object_id,
if (!return_object) {
// This should only happen if the local raylet died. Caller should
// retry the task.
RAY_LOG(WARNING) << "Failed to create task return object " << object_id
<< " in the object store, exiting.";
RAY_LOG(WARNING).WithField(object_id)
<< "Failed to create task return object in the object store, exiting.";
QuickExit();
}
return_object_proto->set_size(return_object->GetSize());
Expand Down
2 changes: 1 addition & 1 deletion src/ray/core_worker/context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ ObjectID WorkerContext::GetGeneratorReturnId(const TaskID &task_id,
// return values.
auto max_generator_returns = GetThreadContext().GetMaxNumGeneratorReturnIndex();
if (put_index > max_generator_returns) {
RAY_LOG(FATAL)
RAY_LOG(FATAL).WithField(current_task_id)
<< "The generator returns " << current_put_index
<< " items, which exceed the maximum number of return values allowed, "
<< max_generator_returns;
Expand Down