]> git.proxmox.com Git - mirror_ovs.git/commitdiff
ovsdb: Move trigger_run after storage_run and read_db.
authorHan Zhou <hzhou8@ebay.com>
Fri, 1 Mar 2019 18:56:36 +0000 (10:56 -0800)
committerBen Pfaff <blp@ovn.org>
Mon, 4 Mar 2019 17:48:35 +0000 (09:48 -0800)
Run triggers after storage_run and read_db to make sure new raft
updates are utilized in current iteration.

Signed-off-by: Han Zhou <hzhou8@ebay.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
ovsdb/ovsdb-server.c

index 4e97de86b58bd677e40dad3f47e91d98af8862bf..9dc1d57afb98c8a5d68f29054364812d3f5ccb35 100644 (file)
@@ -220,6 +220,10 @@ main_loop(struct server_config *config,
         SHASH_FOR_EACH_SAFE (node, next, all_dbs) {
             struct db *db = node->data;
             ovsdb_txn_history_run(db->db);
+            ovsdb_storage_run(db->db->storage);
+            read_db(config, db);
+            /* Run triggers after storage_run and read_db to make sure new raft
+             * updates are utilized in current iteration. */
             if (ovsdb_trigger_run(db->db, time_msec())) {
                 /* The message below is currently the only reason to disconnect
                  * all clients. */
@@ -228,8 +232,6 @@ main_loop(struct server_config *config,
                     xasprintf("committed %s database schema conversion",
                               db->db->name));
             }
-            ovsdb_storage_run(db->db->storage);
-            read_db(config, db);
             if (ovsdb_storage_is_dead(db->db->storage)) {
                 VLOG_INFO("%s: removing database because storage disconnected "
                           "permanently", node->name);