]> git.proxmox.com Git - ovs.git/commitdiff
ovsdb-idl: Avoid sending redundant conditional monitoring updates
authorAndy Zhou <azhou@ovn.org>
Tue, 20 Dec 2016 06:39:53 +0000 (22:39 -0800)
committerAndy Zhou <azhou@ovn.org>
Fri, 6 Jan 2017 21:59:56 +0000 (13:59 -0800)
In case connection is reset when there are buffered but unsent
conditions, these conditions will be sent as the new "monitor_cond"
message that will be sent after the idl reconnects.

Without this patch, those conditions will be unnecessarily sent again
with following monitoring condition update message.

Signed-off-by: Andy Zhou <azhou@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
lib/ovsdb-idl.c

index 1be1c6805586e5895a043c471a4b372f0e4731a7..218b6b33255ad833e440e26b303c3f8789ad4e05 100644 (file)
@@ -345,6 +345,7 @@ ovsdb_idl_clear(struct ovsdb_idl *idl)
         struct ovsdb_idl_table *table = &idl->tables[i];
         struct ovsdb_idl_row *row, *next_row;
 
+        table->cond_changed = false;
         if (hmap_is_empty(&table->rows)) {
             continue;
         }
@@ -370,6 +371,7 @@ ovsdb_idl_clear(struct ovsdb_idl *idl)
         }
     }
 
+    idl->cond_changed = false;
     ovsdb_idl_track_clear(idl);
 
     if (changed) {