Dumitru Ceara
unread,Jul 9, 2020, 3:02:50 PM7/9/20Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Dan Williams, Girish Moodalbail, ovs-discuss, ovn-kub...@googlegroups.com, Han Zhou, Numan Siddique
Hi Girish, Dan,
A bit as a side note, I wonder if there's actually a benefit from using
"set_db_change_aware" on clients that use "short lived" connections to
the DB. It does make sense for long lived connections though.
The problem here is that we always call ovsdb_idl_send_db_change_aware()
after monitor_cond_since(data). And the replies will also arrive in the
same order:
- first monitor_cond_since reply
- then set_db_change_aware reply
If the second one is delayed (e.g. network issues), the IDL might
process the monitor_cond_since(data) reply and the client (ovn-sbctl
will close the connection).
After a quick glance at the code I think it should be safe to first do
set_db_change_aware and afterwards monitor_cond_since(data).
For case 2, it would be possible to handle the set_db_change_aware
result. As far as I see though the "unexpected reply message" DBG log in
the current implementation is quite benign. And the handler would
basically just ignore the reply because the reply is always the same:
https://github.com/openvswitch/ovs/blob/master/Documentation/ref/ovsdb-server.7.rst#4118-database-change-awareness
>
> I guess we're not seeing this at Red Hat because we're using
> monitor_all still... anyone have thoughts about this issue?
>
> Dan
>
For the first case (ovn-sbctl closing the connection too early), we
process messages from the server in batches [0] so we'd only hit the
issue if the reply for set_db_change_aware is delayed and is not
processed in the same batch as the reply for monitor_cond_since. Maybe
that's why we don't hit the issue too often.
Regards,
Dumitru
[0]
https://github.com/openvswitch/ovs/blob/master/lib/ovsdb-idl.c#L923