[ovs-dev] [ovn 2/2] ovn-nbd: Add basic OVSDB transaction comments.

Russell Bryant rbryant at redhat.com
Thu Apr 9 15:50:36 UTC 2015


On 04/09/2015 03:49 AM, Justin Pettit wrote:
> These comments aren't particularly detailed, but it's helpful to at
> least see what is modifying the database contents.
> 
> Signed-off-by: Justin Pettit <jpettit at nicira.com>

I was trying to think if there were any cases where this code would get
hit, but the resulting transaction would be empty other than this added
comment, but I can't think of any.

I can think of some cases right now, but they're just things that
haven't been implemented yet, so I think it's OK to ignore them.

Acked-by: Russell Bryant <rbryant at redhat.com>

> ---
>  ovn/ovn-nbd.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/ovn/ovn-nbd.c b/ovn/ovn-nbd.c
> index 28bc000..54cd3c8 100644
> --- a/ovn/ovn-nbd.c
> +++ b/ovn/ovn-nbd.c
> @@ -415,6 +415,8 @@ main(int argc, char *argv[])
>               * updating the OVN DB.
>               */
>              ctx.ovnsb_txn = ovsdb_idl_txn_create(ctx.ovnsb_idl);
> +            ovsdb_idl_txn_add_comment(ctx.ovnsb_txn,
> +                                      "ovn-nbd: northbound db changed");
>              ovnnb_db_changed(&ctx);
>              ovnnb_changes_pending = false;
>          }
> @@ -425,6 +427,8 @@ main(int argc, char *argv[])
>               * updating the northbound DB.
>               */
>              ctx.ovnnb_txn = ovsdb_idl_txn_create(ctx.ovnnb_idl);
> +            ovsdb_idl_txn_add_comment(ctx.ovnnb_txn,
> +                                      "ovn-nbd: southbound db changed");
>              ovnsb_db_changed(&ctx);
>              ovn_changes_pending = false;
>          }
> 


-- 
Russell Bryant



More information about the dev mailing list