From: Felix Huettner <[email protected]> Run the idl loop for the southbound database until there is no more data to be received or a timeout is reached.
This improves processing of changes when controller iterations take a long time (e.g., we see times of up to ~20s). In such a case, it is better to collect as many changes as possible to be processed in a single run. Previously, changes would be delayed very often because they were stuck in the incoming queue. Signed-off-by: Felix Huettner <[email protected]> Signed-off-by: Martin Morgenstern <[email protected]> --- controller/ovn-controller.c | 3 ++- controller/ovn-controller.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c index 081411cba..4877539b7 100644 --- a/controller/ovn-controller.c +++ b/controller/ovn-controller.c @@ -6044,7 +6044,8 @@ main(int argc, char *argv[]) update_ssl_config(ovsrec_ssl_table_get(ovs_idl_loop.idl)); struct ovsdb_idl_txn *ovnsb_idl_txn - = ovsdb_idl_loop_run(&ovnsb_idl_loop); + = ovsdb_idl_loop_run_completion(&ovnsb_idl_loop, + IDL_LOOP_MAX_DURATION_MS, NULL); unsigned int new_ovnsb_cond_seqno = ovsdb_idl_get_condition_seqno(ovnsb_idl_loop.idl); if (new_ovnsb_cond_seqno != ovnsb_cond_seqno) { diff --git a/controller/ovn-controller.h b/controller/ovn-controller.h index fafd704df..b8492d550 100644 --- a/controller/ovn-controller.h +++ b/controller/ovn-controller.h @@ -19,6 +19,8 @@ #include <stdint.h> +#define IDL_LOOP_MAX_DURATION_MS 500 + struct ovsrec_bridge_table; const struct ovsrec_bridge *get_bridge(const struct ovsrec_bridge_table *, -- 2.45.2 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
