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.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 =