Thanks, Han.

Acked-by: Mark Michelson <[email protected]>

I was debating about whether this was the proper fix or if a better fix would be to use time_msec() in ovn-nbctl's --print-wait-time calculation. I think your way is the best way forward since it's a good idea for the timestamps in the databases to be based on wall-clock time.

On 2/7/22 02:08, Han Zhou wrote:
ovn-nbctl --print-wait-time is now broken due to this bug.
E.g.:
$ ovn-nbctl --wait=hv --print-wait-time sync
Time spent on processing nb_cfg 1:
        ovn-northd delay before processing:     -1643828314999ms
        ovn-northd completion:                  -1643828314998ms
        ovn-controller(s) completion:           3ms

Fixes: b44f6373b404 ("northd: Do not calculate database sequence numbers 
incrementally")
Signed-off-by: Han Zhou <[email protected]>
---
  northd/ovn-northd.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
index 80303503a..8a8c6d07d 100644
--- a/northd/ovn-northd.c
+++ b/northd/ovn-northd.c
@@ -816,7 +816,7 @@ main(int argc, char *argv[])
              }
if (ovsdb_idl_has_lock(ovnsb_idl_loop.idl)) {
-                int64_t loop_start_time = time_msec();
+                int64_t loop_start_time = time_wall_msec();
                  inc_proc_northd_run(ovnnb_txn, ovnsb_txn, recompute);
                  recompute = false;
                  if (ovnsb_txn) {


_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to