Message ID | 1585167323-32760-1-git-send-email-dceara@redhat.com |
---|---|
State | Accepted |
Delegated to: | Ilya Maximets |
Headers | show |
Series | [ovs-dev,v3] Revert "ovsdb-idl: Avoid sending redundant conditional monitoring updates" | expand |
On Wed, Mar 25, 2020 at 1:15 PM Dumitru Ceara <dceara@redhat.com> wrote: > > This reverts commit 5351980b047f4dd40be7a59a1e4b910df21eca0a. > > If the ovsdb-server reply to "monitor_cond_since" requests has > "found" == false then ovsdb_idl_db_parse_monitor_reply() calls > ovsdb_idl_db_clear() which iterates through all tables and > unconditionally sets table->cond_changed to false. > > However, if the client had already set a new condition for some of the > tables, this new condition request will never be sent to ovsdb-server > until the condition is reset to a different value. This is due to the > check in ovsdb_idl_db_set_condition(). > > One way to replicate the issue is described in the bugzilla reporting > the bug, when ovn-controller is configured to use "ovn-monitor-all": > https://bugzilla.redhat.com/show_bug.cgi?id=1808125#c6 > > Commit 5351980b047f tried to optimize sending redundant conditional > monitoring updates but the chances that this scenario happens with the > latest code is quite low since commit 403a6a0cb003 ("ovsdb-idl: Fast > resync from server when connection reset.") changed the behavior of > ovsdb_idl_db_parse_monitor_reply() to avoid calling ovsdb_idl_db_clear() > in most cases. > > Reported-by: Dan Williams <dcbw@redhat.com> > Reported-at: https://bugzilla.redhat.com/1808125 > CC: Andy Zhou <azhou@ovn.org> > Fixes: 5351980b047f ("ovsdb-idl: Avoid sending redundant conditional monitoring updates") > Signed-off-by: Dumitru Ceara <dceara@redhat.com> > > --- > v3: > - Changed commit summary from "ovsdb-idl.c: Clear conditions when > clearing IDL.". Also updated the commit description. > - Instead of clearing IDL conditions, revert 5351980b047f as suggested > by Ilya when reviewing v2: > https://mail.openvswitch.org/pipermail/ovs-dev/2020-March/369144.html > v2: > - Updated commit log so that the "Fixes:" tag reflects the correct > commit that introduced the issue. > --- > lib/ovsdb-idl.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c > index 190143f..1535ad7 100644 > --- a/lib/ovsdb-idl.c > +++ b/lib/ovsdb-idl.c > @@ -610,7 +610,6 @@ ovsdb_idl_db_clear(struct ovsdb_idl_db *db) > struct ovsdb_idl_table *table = &db->tables[i]; > struct ovsdb_idl_row *row, *next_row; > > - table->cond_changed = false; > if (hmap_is_empty(&table->rows)) { > continue; > } > @@ -634,7 +633,6 @@ ovsdb_idl_db_clear(struct ovsdb_idl_db *db) > } > ovsdb_idl_row_destroy_postprocess(db); > > - db->cond_changed = false; > db->cond_seqno = 0; > ovsdb_idl_db_track_clear(db); > > -- > 1.8.3.1 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev Acked-by: Han Zhou <hzhou@ovn.org>
On 3/25/20 9:15 PM, Dumitru Ceara wrote: > This reverts commit 5351980b047f4dd40be7a59a1e4b910df21eca0a. > > If the ovsdb-server reply to "monitor_cond_since" requests has > "found" == false then ovsdb_idl_db_parse_monitor_reply() calls > ovsdb_idl_db_clear() which iterates through all tables and > unconditionally sets table->cond_changed to false. > > However, if the client had already set a new condition for some of the > tables, this new condition request will never be sent to ovsdb-server > until the condition is reset to a different value. This is due to the > check in ovsdb_idl_db_set_condition(). > > One way to replicate the issue is described in the bugzilla reporting > the bug, when ovn-controller is configured to use "ovn-monitor-all": > https://bugzilla.redhat.com/show_bug.cgi?id=1808125#c6 > > Commit 5351980b047f tried to optimize sending redundant conditional > monitoring updates but the chances that this scenario happens with the > latest code is quite low since commit 403a6a0cb003 ("ovsdb-idl: Fast > resync from server when connection reset.") changed the behavior of > ovsdb_idl_db_parse_monitor_reply() to avoid calling ovsdb_idl_db_clear() > in most cases. > > Reported-by: Dan Williams <dcbw@redhat.com> > Reported-at: https://bugzilla.redhat.com/1808125 > CC: Andy Zhou <azhou@ovn.org> > Fixes: 5351980b047f ("ovsdb-idl: Avoid sending redundant conditional monitoring updates") > Signed-off-by: Dumitru Ceara <dceara@redhat.com> LGTM, Acked-by: Ilya Maximets <i.maximets@ovn.org>
On 3/26/20 6:00 PM, Ilya Maximets wrote: > On 3/25/20 9:15 PM, Dumitru Ceara wrote: >> This reverts commit 5351980b047f4dd40be7a59a1e4b910df21eca0a. >> >> If the ovsdb-server reply to "monitor_cond_since" requests has >> "found" == false then ovsdb_idl_db_parse_monitor_reply() calls >> ovsdb_idl_db_clear() which iterates through all tables and >> unconditionally sets table->cond_changed to false. >> >> However, if the client had already set a new condition for some of the >> tables, this new condition request will never be sent to ovsdb-server >> until the condition is reset to a different value. This is due to the >> check in ovsdb_idl_db_set_condition(). >> >> One way to replicate the issue is described in the bugzilla reporting >> the bug, when ovn-controller is configured to use "ovn-monitor-all": >> https://bugzilla.redhat.com/show_bug.cgi?id=1808125#c6 >> >> Commit 5351980b047f tried to optimize sending redundant conditional >> monitoring updates but the chances that this scenario happens with the >> latest code is quite low since commit 403a6a0cb003 ("ovsdb-idl: Fast >> resync from server when connection reset.") changed the behavior of >> ovsdb_idl_db_parse_monitor_reply() to avoid calling ovsdb_idl_db_clear() >> in most cases. >> >> Reported-by: Dan Williams <dcbw@redhat.com> >> Reported-at: https://bugzilla.redhat.com/1808125 >> CC: Andy Zhou <azhou@ovn.org> >> Fixes: 5351980b047f ("ovsdb-idl: Avoid sending redundant conditional monitoring updates") >> Signed-off-by: Dumitru Ceara <dceara@redhat.com> > > LGTM, > Acked-by: Ilya Maximets <i.maximets@ovn.org> > Thanks Dumitru, Han and Numan. I went ahead and applied this patch to master. Backported down to 2.7. Best regards, Ilya Maximets.
On 3/27/20 11:25 PM, Ilya Maximets wrote: > On 3/26/20 6:00 PM, Ilya Maximets wrote: >> On 3/25/20 9:15 PM, Dumitru Ceara wrote: >>> This reverts commit 5351980b047f4dd40be7a59a1e4b910df21eca0a. >>> >>> If the ovsdb-server reply to "monitor_cond_since" requests has >>> "found" == false then ovsdb_idl_db_parse_monitor_reply() calls >>> ovsdb_idl_db_clear() which iterates through all tables and >>> unconditionally sets table->cond_changed to false. >>> >>> However, if the client had already set a new condition for some of the >>> tables, this new condition request will never be sent to ovsdb-server >>> until the condition is reset to a different value. This is due to the >>> check in ovsdb_idl_db_set_condition(). >>> >>> One way to replicate the issue is described in the bugzilla reporting >>> the bug, when ovn-controller is configured to use "ovn-monitor-all": >>> https://bugzilla.redhat.com/show_bug.cgi?id=1808125#c6 >>> >>> Commit 5351980b047f tried to optimize sending redundant conditional >>> monitoring updates but the chances that this scenario happens with the >>> latest code is quite low since commit 403a6a0cb003 ("ovsdb-idl: Fast >>> resync from server when connection reset.") changed the behavior of >>> ovsdb_idl_db_parse_monitor_reply() to avoid calling ovsdb_idl_db_clear() >>> in most cases. >>> >>> Reported-by: Dan Williams <dcbw@redhat.com> >>> Reported-at: https://bugzilla.redhat.com/1808125 >>> CC: Andy Zhou <azhou@ovn.org> >>> Fixes: 5351980b047f ("ovsdb-idl: Avoid sending redundant conditional monitoring updates") >>> Signed-off-by: Dumitru Ceara <dceara@redhat.com> >> >> LGTM, >> Acked-by: Ilya Maximets <i.maximets@ovn.org> >> > > Thanks Dumitru, Han and Numan. > I went ahead and applied this patch to master. Backported down to 2.7. > > Best regards, Ilya Maximets. > Thanks!
diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c index 190143f..1535ad7 100644 --- a/lib/ovsdb-idl.c +++ b/lib/ovsdb-idl.c @@ -610,7 +610,6 @@ ovsdb_idl_db_clear(struct ovsdb_idl_db *db) struct ovsdb_idl_table *table = &db->tables[i]; struct ovsdb_idl_row *row, *next_row; - table->cond_changed = false; if (hmap_is_empty(&table->rows)) { continue; } @@ -634,7 +633,6 @@ ovsdb_idl_db_clear(struct ovsdb_idl_db *db) } ovsdb_idl_row_destroy_postprocess(db); - db->cond_changed = false; db->cond_seqno = 0; ovsdb_idl_db_track_clear(db);
This reverts commit 5351980b047f4dd40be7a59a1e4b910df21eca0a. If the ovsdb-server reply to "monitor_cond_since" requests has "found" == false then ovsdb_idl_db_parse_monitor_reply() calls ovsdb_idl_db_clear() which iterates through all tables and unconditionally sets table->cond_changed to false. However, if the client had already set a new condition for some of the tables, this new condition request will never be sent to ovsdb-server until the condition is reset to a different value. This is due to the check in ovsdb_idl_db_set_condition(). One way to replicate the issue is described in the bugzilla reporting the bug, when ovn-controller is configured to use "ovn-monitor-all": https://bugzilla.redhat.com/show_bug.cgi?id=1808125#c6 Commit 5351980b047f tried to optimize sending redundant conditional monitoring updates but the chances that this scenario happens with the latest code is quite low since commit 403a6a0cb003 ("ovsdb-idl: Fast resync from server when connection reset.") changed the behavior of ovsdb_idl_db_parse_monitor_reply() to avoid calling ovsdb_idl_db_clear() in most cases. Reported-by: Dan Williams <dcbw@redhat.com> Reported-at: https://bugzilla.redhat.com/1808125 CC: Andy Zhou <azhou@ovn.org> Fixes: 5351980b047f ("ovsdb-idl: Avoid sending redundant conditional monitoring updates") Signed-off-by: Dumitru Ceara <dceara@redhat.com> --- v3: - Changed commit summary from "ovsdb-idl.c: Clear conditions when clearing IDL.". Also updated the commit description. - Instead of clearing IDL conditions, revert 5351980b047f as suggested by Ilya when reviewing v2: https://mail.openvswitch.org/pipermail/ovs-dev/2020-March/369144.html v2: - Updated commit log so that the "Fixes:" tag reflects the correct commit that introduced the issue. --- lib/ovsdb-idl.c | 2 -- 1 file changed, 2 deletions(-)