summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/Database.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2015-10-29 15:48:26 -0230
committerDwayne Boone <dwayne@zeroc.com>2015-10-29 15:48:26 -0230
commitac3ff2c2682b9184cf5770d0df61c363aca249f6 (patch)
treeb40c9cb9815aea6d31dd2021c3d988cccda30fdf /cpp/src/IceGrid/Database.cpp
parentAdded ReadyCallback support for acceptors (diff)
downloadice-ac3ff2c2682b9184cf5770d0df61c363aca249f6.tar.bz2
ice-ac3ff2c2682b9184cf5770d0df61c363aca249f6.tar.xz
ice-ac3ff2c2682b9184cf5770d0df61c363aca249f6.zip
Initialize IceGrid serial map on startup
Diffstat (limited to 'cpp/src/IceGrid/Database.cpp')
-rw-r--r--cpp/src/IceGrid/Database.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/cpp/src/IceGrid/Database.cpp b/cpp/src/IceGrid/Database.cpp
index c492343694c..7717b72907e 100644
--- a/cpp/src/IceGrid/Database.cpp
+++ b/cpp/src/IceGrid/Database.cpp
@@ -268,6 +268,21 @@ Database::Database(const Ice::ObjectAdapterPtr& registryAdapter,
_nodeObserverTopic = new NodeObserverTopic(_topicManager, _internalAdapter);
_registryObserverTopic = new RegistryObserverTopic(_topicManager);
+ // Set all serials to 1 if they have not yet been set.
+ Ice::Long serial;
+ if(!_serials.get(txn, applicationsDbName, serial))
+ {
+ _serials.put(txn, applicationsDbName, 1);
+ }
+ if(!_serials.get(txn, adaptersDbName, serial))
+ {
+ _serials.put(txn, adaptersDbName, 1);
+ }
+ if(!_serials.get(txn, objectsDbName, serial))
+ {
+ _serials.put(txn, objectsDbName, 1);
+ }
+
_applicationObserverTopic =
new ApplicationObserverTopic(_topicManager, toMap(txn, _applications), getSerial(txn, applicationsDbName));
_adapterObserverTopic =