[ovs-dev] [PATCH 1/2] ovsdb: Move trigger_run after storage_run and read_db.
Han Zhou
zhouhan at gmail.com
Fri Mar 1 18:56:36 UTC 2019
From: Han Zhou <hzhou8 at ebay.com>
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 at ebay.com>
---
ovsdb/ovsdb-server.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c
index 4e97de8..9dc1d57 100644
--- a/ovsdb/ovsdb-server.c
+++ b/ovsdb/ovsdb-server.c
@@ -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);
--
2.1.0
More information about the dev
mailing list