[ovs-dev] [PATCH ovn 1/3] inc-proc-northd: Don't reset I-P engine force recompute.

Dumitru Ceara dceara at redhat.com
Fri Nov 19 15:56:11 UTC 2021


In some cases, e.g., when ovn-northd reconnects to NB or SB, a full
recompute must be triggered.  In such cases inc_proc_northd_run() is
called with 'recompute=true' and it should in turn call
engine_set_force_recompute(true).

However, when 'recompute=false', inc_proc_northd_run() should not
reset the I-P engine forced recompute request.  The only time when
force-recompute should be set to 'false' is after a successful engine
run.

Fixes: 4597317f16d1 ("northd: Introduce incremental processing for northd")
Signed-off-by: Dumitru Ceara <dceara at redhat.com>
---
 northd/inc-proc-northd.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/northd/inc-proc-northd.c b/northd/inc-proc-northd.c
index c7f49d599..006d1f129 100644
--- a/northd/inc-proc-northd.c
+++ b/northd/inc-proc-northd.c
@@ -249,9 +249,16 @@ void inc_proc_northd_init(struct ovsdb_idl_loop *nb,
 void inc_proc_northd_run(struct ovsdb_idl_txn *ovnnb_txn,
                          struct ovsdb_idl_txn *ovnsb_txn,
                          bool recompute) {
-    engine_set_force_recompute(recompute);
     engine_init_run();
 
+    /* Force a full recompute if instructed to, for example, after a NB/SB
+     * reconnect event.  However, make sure we don't overwrite an existing
+     * force-recompute request if 'recompute' is false.
+     */
+    if (recompute) {
+        engine_set_force_recompute(recompute);
+    }
+
     struct engine_context eng_ctx = {
         .ovnnb_idl_txn = ovnnb_txn,
         .ovnsb_idl_txn = ovnsb_txn,



More information about the dev mailing list