]> git.proxmox.com Git - ovs.git/commitdiff
ovsdb-idl: Add comment with program name to ovsdb_idl_loop transactions.
authorBen Pfaff <blp@ovn.org>
Fri, 15 May 2020 16:36:37 +0000 (09:36 -0700)
committerBen Pfaff <blp@ovn.org>
Mon, 2 Nov 2020 23:15:19 +0000 (15:15 -0800)
This can make it easier to see what daemon is committing transactions.
Sometimes, in OVN especially, it can be hard to guess.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Dumitru Ceara <dceara@redhat.com>
lib/ovsdb-idl.c

index d8f221ca607364c4aae460e2de40f1b08628923b..fdb9d85f5ccce266532125df42515d3e0e31cbb4 100644 (file)
@@ -5521,6 +5521,9 @@ ovsdb_idl_loop_run(struct ovsdb_idl_loop *loop)
                       || ovsdb_idl_get_seqno(loop->idl) == loop->skip_seqno
                       ? NULL
                       : ovsdb_idl_txn_create(loop->idl));
+    if (loop->open_txn) {
+        ovsdb_idl_txn_add_comment(loop->open_txn, "%s", program_name);
+    }
     return loop->open_txn;
 }