[Core] Fix Flaky GCS actor manager test (#10600)

* Try.

* Fix the issue.

* Fix.
This commit is contained in:
SangBin Cho
2020-09-17 16:10:57 -07:00
committed by Barak Michener
parent f1fed7f662
commit 2fb29eb680
2 changed files with 5 additions and 6 deletions
+3 -4
View File
@@ -572,8 +572,7 @@ void GcsActorManager::DestroyActor(const ActorID &actor_id) {
// Remove actor from `named_actors_` if its name is not empty.
if (!actor->GetName().empty()) {
auto it = named_actors_.find(actor->GetName());
if (it != named_actors_.end()) {
RAY_CHECK(it->second == actor->GetActorID());
if (it != named_actors_.end() && it->second == actor->GetActorID()) {
named_actors_.erase(it);
}
}
@@ -824,11 +823,11 @@ void GcsActorManager::ReconstructActor(const ActorID &actor_id, bool need_resche
// Remove actor from `named_actors_` if its name is not empty.
if (!actor->GetName().empty()) {
auto it = named_actors_.find(actor->GetName());
if (it != named_actors_.end()) {
RAY_CHECK(it->second == actor->GetActorID());
if (it != named_actors_.end() && it->second == actor->GetActorID()) {
named_actors_.erase(it);
}
}
mutable_actor_table_data->set_state(rpc::ActorTableData::DEAD);
// The backend storage is reliable in the future, so the status must be ok.
RAY_CHECK_OK(gcs_table_storage_->ActorTable().Put(
+2 -2
View File
@@ -317,8 +317,8 @@ class GcsActorManager : public rpc::ActorInfoHandler {
/// state associated with the actor and marks the actor as dead. For owned
/// actors, this should be called when all actor handles have gone out of
/// scope or the owner has died.
/// TODO: For detached actors, this should be called when the application
/// deregisters the actor.
/// NOTE: This method can be called multiple times in out-of-order and should be
/// idempotent.
void DestroyActor(const ActorID &actor_id);
/// Get unresolved actors that were submitted from the specified node.