diff options
author | Benoit Foucher <benoit@zeroc.com> | 2013-09-04 02:11:20 -0700 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2013-09-04 02:11:20 -0700 |
commit | d59684e5117cc834e65f0affa16ab4659c07359f (patch) | |
tree | 8bbba5ed7a6f8f37e59eb56b2533b7a3a97bef02 /cpp/src | |
parent | minor edits in CHANGES (diff) | |
download | ice-d59684e5117cc834e65f0affa16ab4659c07359f.tar.bz2 ice-d59684e5117cc834e65f0affa16ab4659c07359f.tar.xz ice-d59684e5117cc834e65f0affa16ab4659c07359f.zip |
Fixed IceGrid/replication test failures on Ubuntu
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/IceGrid/Database.cpp | 28 | ||||
-rw-r--r-- | cpp/src/IceGrid/RegistryI.cpp | 17 |
2 files changed, 28 insertions, 17 deletions
diff --git a/cpp/src/IceGrid/Database.cpp b/cpp/src/IceGrid/Database.cpp index 14e454df6d5..e95af5961d9 100644 --- a/cpp/src/IceGrid/Database.cpp +++ b/cpp/src/IceGrid/Database.cpp @@ -328,9 +328,9 @@ Database::syncAdapters(const AdapterInfoSeq& adapters, Ice::Long dbSerial) } } - if(_traceLevels->application > 0) + if(_traceLevels->adapter > 0) { - Ice::Trace out(_traceLevels->logger, _traceLevels->applicationCat); + Ice::Trace out(_traceLevels->logger, _traceLevels->adapterCat); out << "synchronized adapters (serial = `" << dbSerial << "')"; } @@ -372,9 +372,9 @@ Database::syncObjects(const ObjectInfoSeq& objects, Ice::Long dbSerial) } } - if(_traceLevels->application > 0) + if(_traceLevels->object > 0) { - Ice::Trace out(_traceLevels->logger, _traceLevels->applicationCat); + Ice::Trace out(_traceLevels->logger, _traceLevels->objectCat); out << "synchronized objects (serial = `" << dbSerial << "')"; } @@ -560,7 +560,7 @@ Database::addApplication(const ApplicationInfo& info, AdminSessionI* session, Ic if(_traceLevels->application > 0) { Ice::Trace out(_traceLevels->logger, _traceLevels->applicationCat); - out << "added application `" << info.descriptor.name << "'"; + out << "added application `" << info.descriptor.name << "' (serial = `" << dbSerial << "')"; } finishUpdating(info.descriptor.name); } @@ -767,7 +767,7 @@ Database::removeApplication(const string& name, AdminSessionI* session, Ice::Lon if(_traceLevels->application > 0) { Ice::Trace out(_traceLevels->logger, _traceLevels->applicationCat); - out << "removed application `" << name << "'"; + out << "removed application `" << name << "' (serial = `" << dbSerial << "')"; } finishUpdating(name); @@ -928,6 +928,7 @@ Database::setAdapterDirectProxy(const string& adapterId, const string& replicaGr { out << " with replica group `" << replicaGroupId << "'"; } + out << " (serial = `" << dbSerial << "')"; } if(proxy) @@ -1041,7 +1042,7 @@ Database::removeAdapter(const string& adapterId) if(_traceLevels->adapter > 0) { Ice::Trace out(_traceLevels->logger, _traceLevels->adapterCat); - out << "removed " << (infos.empty() ? "adapter" : "replica group") << " `" << adapterId << "'"; + out << "removed " << (infos.empty() ? "adapter" : "replica group") << " `" << adapterId << "' (serial = `" << dbSerial << "')"; } if(infos.empty()) @@ -1216,7 +1217,7 @@ Database::addObject(const ObjectInfo& info) if(_traceLevels->object > 0) { Ice::Trace out(_traceLevels->logger, _traceLevels->objectCat); - out << "added object `" << _communicator->identityToString(id) << "'"; + out << "added object `" << _communicator->identityToString(id) << "' (serial = `" << dbSerial << "')"; } } _objectObserverTopic->waitForSyncedSubscribers(serial); @@ -1280,7 +1281,7 @@ Database::addOrUpdateObject(const ObjectInfo& info, Ice::Long dbSerial) if(_traceLevels->object > 0) { Ice::Trace out(_traceLevels->logger, _traceLevels->objectCat); - out << (!update ? "added" : "updated") << " object `" << _communicator->identityToString(id) << "'"; + out << (!update ? "added" : "updated") << " object `" << _communicator->identityToString(id) << "' (serial = `" << dbSerial << "')"; } } _objectObserverTopic->waitForSyncedSubscribers(serial); @@ -1342,7 +1343,7 @@ Database::removeObject(const Ice::Identity& id, Ice::Long dbSerial) if(_traceLevels->object > 0) { Ice::Trace out(_traceLevels->logger, _traceLevels->objectCat); - out << "removed object `" << _communicator->identityToString(id) << "'"; + out << "removed object `" << _communicator->identityToString(id) << "' (serial = `" << dbSerial << "')"; } } _objectObserverTopic->waitForSyncedSubscribers(serial); @@ -1409,7 +1410,7 @@ Database::updateObject(const Ice::ObjectPrx& proxy) if(_traceLevels->object > 0) { Ice::Trace out(_traceLevels->logger, _traceLevels->objectCat); - out << "updated object `" << _communicator->identityToString(id) << "'"; + out << "updated object `" << _communicator->identityToString(id) << "' (serial = `" << dbSerial << "')"; } } _objectObserverTopic->waitForSyncedSubscribers(serial); @@ -2443,6 +2444,11 @@ Database::finishApplicationUpdate(const ApplicationUpdateInfo& update, } } + if(_traceLevels->application > 0) + { + Ice::Trace out(_traceLevels->logger, _traceLevels->applicationCat); + out << "updated application `" << update.descriptor.name << "' (serial = `" << dbSerial << "')"; + } finishUpdating(update.descriptor.name); } diff --git a/cpp/src/IceGrid/RegistryI.cpp b/cpp/src/IceGrid/RegistryI.cpp index c18adab07de..3c6128ea918 100644 --- a/cpp/src/IceGrid/RegistryI.cpp +++ b/cpp/src/IceGrid/RegistryI.cpp @@ -445,9 +445,12 @@ RegistryI::startImpl() { Ice::Long serial; IceGrid::InternalRegistryPrx registry = IceGrid::InternalRegistryPrx::checkedCast(proxy); - _database->syncApplications(registry->getApplications(serial), serial); - _database->syncAdapters(registry->getAdapters(serial), serial); - _database->syncObjects(registry->getObjects(serial), serial); + ApplicationInfoSeq applications = registry->getApplications(serial); + _database->syncApplications(applications, serial); + AdapterInfoSeq adapters = registry->getAdapters(serial); + _database->syncAdapters(adapters, serial); + ObjectInfoSeq objects = registry->getObjects(serial); + _database->syncObjects(objects, serial); } catch(const Ice::OperationNotExistException&) { @@ -1482,11 +1485,12 @@ RegistryI::registerReplicas(const InternalRegistryPrx& internalRegistry, const N break; } } + ObjectInfoSeq infos; if(registry) { try { - _database->removeObject(registry->ice_getIdentity()); + infos.push_back(_database->getObjectInfo(registry->ice_getIdentity())); } catch(const ObjectNotRegisteredException&) { @@ -1494,12 +1498,13 @@ RegistryI::registerReplicas(const InternalRegistryPrx& internalRegistry, const N } try { - _database->removeObject(replica->ice_getIdentity()); + infos.push_back(_database->getObjectInfo(replica->ice_getIdentity())); } catch(const ObjectNotRegisteredException&) { } - + _database->removeRegistryWellKnownObjects(infos); + if(_traceLevels && _traceLevels->replica > 1) { Ice::Trace out(_traceLevels->logger, _traceLevels->replicaCat); |