[ovs-dev] [PATCH v2] ovsdb-idl: fix index row setting with references.

Ben Pfaff blp at ovn.org
Mon Oct 30 18:27:03 UTC 2017


On Fri, Oct 27, 2017 at 05:40:56PM -0700, Han Zhou wrote:
> IDL index should be able to be used without having to be in a
> transaction. However, current implementation leads to crash if
> a reference type column is being set in an index row for querying
> purpose when it is not in a transaction. It is because of the
> uninitialized arcs and unnecessary updates of the arcs. This patch
> fixes it by identifying index rows by a magic uuid, so that when
> parsing index row, the arcs are not updated. A new test case is
> added to cover this scenario.
> 
> Signed-off-by: Han Zhou <zhouhan at gmail.com>
> ---
> 
> Notes:
>     v1 -> v2: use magic UUID to identify index rows to avoid introducing
>               a parameter everywhere.

Thanks for the revision!

I still see a spelling error "udpate" in the commit.  Please fix it.

Instead of using memcpy() to copy a UUID, please use struct assignment
(it is probably not necessary to have a function to do this).

Our usual practice is to write:
  static void
  set_index_row(struct ovsdb_idl_row *row)
instead of:
  static void set_index_row(struct ovsdb_idl_row *row)

Thanks,

Ben.


More information about the dev mailing list