summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/Database.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IceGrid/Database.cpp')
-rw-r--r--cpp/src/IceGrid/Database.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/cpp/src/IceGrid/Database.cpp b/cpp/src/IceGrid/Database.cpp
index 300865cf469..4abfe9e436d 100644
--- a/cpp/src/IceGrid/Database.cpp
+++ b/cpp/src/IceGrid/Database.cpp
@@ -1262,14 +1262,19 @@ Database::getAdapterInfo(const string& id)
// server, if that's the case we get the adapter proxy from the
// server.
//
+ GetAdapterInfoResultPtr result;
try
{
Lock sync(*this); // Make sure this isn't call during an update.
- return _adapterCache.get(id)->getAdapterInfo();
+ result = _adapterCache.get(id)->getAdapterInfoAsync();
}
catch(const AdapterNotExistException&)
{
}
+ if(result)
+ {
+ return result->get(); // Don't hold the database lock while waiting for the endpoints
+ }
//
// Otherwise, we check the adapter endpoint table -- if there's an
@@ -1314,7 +1319,7 @@ Database::getFilteredAdapterInfo(const string& id, const Ice::ConnectionPtr& con
Lock sync(*this); // Make sure this isn't call during an update.
AdapterEntryPtr entry = _adapterCache.get(id);
- infos = entry->getAdapterInfo();
+ infos = entry->getAdapterInfoNoEndpoints();
replicaGroup = ReplicaGroupEntryPtr::dynamicCast(entry);
}
if(replicaGroup)