Uploaded image for project: 'Fast Datapath Product'
  1. Fast Datapath Product
  2. FDP-193

[ovsdb-idl] Inserted and deleted referenced records are reported as "spurious" deletes.

    • 2
    • False
    • Hide

      None

      Show
      None
    • False
    • openvswitch3.2-3.2.0-41.el9fdp
    • rhel-9
    • None
    • rhel-net-ovs-dpdk
    • ssg_networking
    • 2
    • OVS/DPDK - FDP-25.D
    • 1
    • Critical

      The following test case fails with the latest OVS code:

      diff --git a/tests/ovsdb-idl.at b/tests/ovsdb-idl.at
      index 1028b0237875..7c4aeb3d5331 100644
      --- a/tests/ovsdb-idl.at
      +++ b/tests/ovsdb-idl.at
      @@ -1507,6 +1507,56 @@ OVSDB_CHECK_IDL_TRACK([track, simple idl, initially populated, weak references,
       006: done
       ]])
       
      +OVSDB_CHECK_IDL_TRACK([track, simple idl, initially populated, weak references, insert+delete batch, TODO],
      +  [['["idltest",
      +      {"op": "insert",
      +       "table": "simple",
      +       "row": {"s": "row0_s"},
      +       "uuid-name": "uuid_row0_s"},
      +      {"op": "insert",
      +       "table": "simple6",
      +       "row": {"name": "row0_s6",
      +               "weak_ref": ["set",
      +                             [["named-uuid", "uuid_row0_s"]]
      +                           ]}}]']],
      +  [['condition simple [true];simple6 [true]' \
      +    '["idltest",
      +      {"op": "insert",
      +       "table": "simple",
      +       "row": {"s": "row1_s"},
      +       "uuid-name": "uuid_row1_s"},
      +      {"op": "mutate",
      +       "table": "simple6",
      +       "where": [["name", "==", "row0_s6"]],
      +       "mutations": [["weak_ref", "insert", ["set", [["named-uuid", "uuid_row1_s"]]]]]}]' \
      +    '+["idltest",
      +      {"op": "delete",
      +       "table": "simple",
      +       "where": [["s", "==", "row1_s"]]}]' \
      +    '["idltest",
      +      {"op": "insert",
      +       "table": "simple",
      +       "row": {"s": "row2_s"}}]']],
      +  [[000: simple6: conditions unchanged
      +000: simple: conditions unchanged
      +001: table simple6: inserted row: name=row0_s6 weak_ref=[<0>] uuid=<1>
      +001: table simple6: updated columns: name weak_ref
      +001: table simple: inserted row: i=0 r=0 b=false s=row0_s u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<0>
      +001: table simple: updated columns: s
      +002: {"error":null,"result":[{"uuid":["uuid","<3>"]},{"count":1}]}
      +003: {"error":null,"result":[{"count":1}]}
      +004: table simple6: name=row0_s6 weak_ref=[<0>] uuid=<1>
      +004: table simple6: updated columns: weak_ref
      +004: table simple: inserted/deleted row: i=0 r=0 b=false s=row1_s u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<3>
      +004: table simple: updated columns: s
      +005: {"error":null,"result":[{"uuid":["uuid","<4>"]}]}
      +006: table simple6: name=row0_s6 weak_ref=[<0>] uuid=<1>
      +006: table simple: i=0 r=0 b=false s=row0_s u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<0>
      +006: table simple: inserted row: i=0 r=0 b=false s=row2_s u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<4>
      +006: table simple: updated columns: s
      +007: done
      +]])
      +
       dnl This test checks that deleting both the destination and source of the
       dnl reference doesn't remove the reference in the source tracked record.
       OVSDB_CHECK_IDL_TRACK([track, simple idl, initially populated, strong references, multiple deletes],
      

      The test fails as follows:

      ./ovsdb-idl.at:1510: sort stdout | uuidfilt
      --- -   2023-12-06 14:54:01.053228998 +0100
      +++ /home/dceara/git-repos/ovs/tests/testsuite.dir/at-groups/2360/stdout        2023-12-06 14:54:01.049808593 +0100
      @@ -8,7 +8,7 @@
       003: {"error":null,"result":[{"count":1}]}
       004: table simple6: name=row0_s6 weak_ref=[<0>] uuid=<1>
       004: table simple6: updated columns: weak_ref
      -004: table simple: inserted/deleted row: i=0 r=0 b=false s=row1_s u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<3>
      +004: table simple: deleted row: i=0 r=0 b=false s=row1_s u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<3>
       004: table simple: updated columns: s
       005: {"error":null,"result":[{"uuid":["uuid","<4>"]}]}
       006: table simple6: name=row0_s6 weak_ref=[<0>] uuid=<1>
      

      This essentially means the application is informed that a "delete of an nonexistent record" happened. That's wrong. Either the IDL should report this as "inserted/deleted" or not at all.

              rh-ee-mpattric Mike Pattrick
              dceara@redhat.com Dumitru Ceara
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: