[ovs-git] [openvswitch/ovs] 553d52: ovsdb-cs: Consider all tables when computing expec...

Dumitru Ceara noreply at github.com
Fri May 14 12:33:41 UTC 2021


  Branch: refs/heads/branch-2.15
  Home:   https://github.com/openvswitch/ovs
  Commit: 553d523929cab699bceec57c0a923d47b3c5499b
      https://github.com/openvswitch/ovs/commit/553d523929cab699bceec57c0a923d47b3c5499b
  Author: Dumitru Ceara <dceara at redhat.com>
  Date:   2021-05-14 (Fri, 14 May 2021)

  Changed paths:
    M lib/ovsdb-cs.c

  Log Message:
  -----------
  ovsdb-cs: Consider all tables when computing expected cond seqno.

In ovsdb_cs_db_set_condition(), take into account all pending condition
changes for all tables when computing the db->cond_seqno at which the
monitor is expected to be updated.

In the following scenario, with two tables, A and B, the old code
performed the following steps:
1. Initial db->cond_seqno = X.
2. Client changes condition for table A:
   - A->new_cond gets set
   - expected cond seqno returned to the client: X + 1
3. ovsdb-cs sends the monitor_cond_change for table A
   - A->req_cond <- A->new_cond
4. Client changes condition for table B:
   - B->new_cond gets set
   - expected cond seqno returned to the client: X + 1
   - however, because the condition change at step 3 is still not replied
     to, table B's monitor_cond_change request is not sent yet.
5. ovsdb-cs receives the reply for the condition change at step 3:
   - db->cond_seqno <- X + 1
6. ovsdb-cs sends the monitor_cond_change for table B
7. ovsdb-cs receives the reply for the condition change at step 6:
  - db->cond_seqno <- X + 2

The client was incorrectly informed that it will have all relevant
updates for table B at seqno X + 1 while actually that happens later, at
seqno X + 2.

Fixes: 46437c5232bd ("ovsdb-idl: Enhance conditional monitoring API")
Acked-by: Ben Pfaff <blp at ovn.org>
Signed-off-by: Dumitru Ceara <dceara at redhat.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>




More information about the git mailing list