@@ -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,
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@redhat.com> --- northd/inc-proc-northd.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)