Skip to content

Commit

Permalink
ovsdb-idl: Avoid sending redundant conditional monitoring updates
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Ben Pfaff <[email protected]>
  • Loading branch information
azhou-nicira committed Jan 6, 2017
1 parent 790e2d4 commit 5351980
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/ovsdb-idl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -370,6 +371,7 @@ ovsdb_idl_clear(struct ovsdb_idl *idl)
}
}

idl->cond_changed = false;
ovsdb_idl_track_clear(idl);

if (changed) {
Expand Down

0 comments on commit 5351980

Please sign in to comment.