summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2019-05-01 14:06:21 +0200
committerJohnny Willemsen <jwillemsen@remedy.nl>2019-05-01 14:06:21 +0200
commit3bd772780b1a4bbc2dde75a97cce17370ad42fe6 (patch)
tree1a60098f0351d85d2f7d64232c208d5cb487fe2c
parented9cc7537297fe03f1792001216b8c6eda76653b (diff)
downloadATCD-3bd772780b1a4bbc2dde75a97cce17370ad42fe6.tar.gz
In ping_replied when we get a death and we didn't wait for a ping but do get a death notify wait on the process exit before marking the server as death
* TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp:
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp32
1 files changed, 28 insertions, 4 deletions
diff --git a/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp b/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp
index a5078b1f7c2..513f5d2e2de 100644
--- a/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp
+++ b/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp
@@ -650,8 +650,8 @@ AsyncAccessManager::ping_replied (LiveStatus server)
if (ImR_Locator_i::debug () > 4)
{
ORBSVCS_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%P|%t) AsyncAccessManager(%@)::ping_replied pid = %d,")
- ACE_TEXT (" transition to <WAIT_FOR_DEATH>\n"),
+ ACE_TEXT ("(%P|%t) AsyncAccessManager(%@)::ping_replied pid <%d>,")
+ ACE_TEXT (" waiting on ping, transition to <WAIT_FOR_DEATH>\n"),
this, this->info_->pid));
}
this->status (ImplementationRepository::AAM_WAIT_FOR_DEATH);
@@ -660,7 +660,7 @@ AsyncAccessManager::ping_replied (LiveStatus server)
if (ImR_Locator_i::debug () > 4)
{
ORBSVCS_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%P|%t) AsyncAccessManager(%@)::ping_replied pid = %d,")
+ ACE_TEXT ("(%P|%t) AsyncAccessManager(%@)::ping_replied pid <%d>,")
ACE_TEXT (" trying to restart server\n"),
this, this->info_->pid));
}
@@ -671,7 +671,31 @@ AsyncAccessManager::ping_replied (LiveStatus server)
}
else
{
- this->status (ImplementationRepository::AAM_SERVER_DEAD);
+ // If we get a death notify we wait for the death of the process, the fact that the
+ // ping failed doesn't mean the process itself is already death
+ if (this->info_->death_notify && this->info_->pid != 0)
+ {
+ if (ImR_Locator_i::debug () > 4)
+ {
+ ORBSVCS_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("(%P|%t) AsyncAccessManager(%@)::ping_replied pid <%d>,")
+ ACE_TEXT (" transition to <WAIT_FOR_DEATH>\n"),
+ this, this->info_->pid));
+ }
+ this->status (ImplementationRepository::AAM_WAIT_FOR_DEATH);
+ return;
+ }
+ else
+ {
+ if (ImR_Locator_i::debug () > 4)
+ {
+ ORBSVCS_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("(%P|%t) AsyncAccessManager(%@)::ping_replied pid <%d>,")
+ ACE_TEXT (" transition to <SERVER_DEAD>\n"),
+ this, this->info_->pid));
+ }
+ this->status (ImplementationRepository::AAM_SERVER_DEAD);
+ }
}
}
break;