On Thu, 2026-10-22 at 22:49 +0200, Ilya Maximets wrote:
> 
> You're quoting the entire message below, so please reply inline
> there,
> do not copy.
> 

Sorry About that, fixed here.

> 
> 
> All this is still not a reason to invent a third mechanism for the
> inactivity disconnection.  AFAICT, both patches that previously added
> the 'receive_attempted' and the 'now+1' missed the backlogged
> connection
> case assuming that every user actually calls the receive function.
> 
> The goal of the 'receive_attempted' change was to avoid
> disconnections
> when the server itself was doing something for way too long and
> didn't
> receive, which is not the case here.  And the fix for it I made
> assumed
> that now+1 case will happen at most once.  These assumptions are
> clearly
> incorrect and so the change in behavior is warranted.
> 

Agreed.  Your suggestion gives the same behaviour as my v2 2/2: while
something is queued, the probe and timeout run on schedule, and only a
shrinking queue counts as activity.

> Since the ovsdb-server is actually the only user of the jsonrpc
> library
> that may not call receive, we should make a new configurable behavior
> like setting an option declaring that this user will not receive if
> there
> is a backlog and during the run() we can just call
> receive_attempted() on
> such a session when there is a backlog.

I prototyped this.  jsonrpc_session gets a flag, set through
jsonrpc_session_set_backlog_blocks_recv(), and ovsdb-server sets it in
ovsdb_jsonrpc_session_create().  In jsonrpc_session_run(), after
jsonrpc_run() and the existing backlog-shrank activity check, a session
with the flag that still has a backlog calls
reconnect_receive_attempted().  reconnect.c and the Python library are
untouched.

I re-ran the measurements from v2 against it, including a real
octavia-driver-agent wedged mid-dump over ssl, and it behaves the same
as v2: the poll loop no longer spins, and a peer whose queue stops
moving is disconnected at the ordinary inactivity timeout.  The numbers
will be in the v3 commit message.

> 
> So, the receive_attempted gate will still prevent disconnection if
> ovsdb
> by itself goes to do something for the very long time, achieving the
> original goal.  And it will no longer trigger now+1 wakeups fixing
> the
> problem at hand.  If backlog moves, that will still count as activity
> and if it doesn't, then the client will get disconnected after the
> probe
> interval passes, without any new complicated logic or API changes.

Yes, that is what I see: a peer whose queue keeps moving is kept, and
one whose queue stops for a probe interval is disconnected after the
probe.

> 
> The receive_attmpted will be called when it actually wasn't, but this
> will be hidden behiind the scenes and only require a comment in one
> place where this is happening.
> 

Yes, it's one comment in jsonrpc_session_run().  I'll post v3 shortly
as a single patch replacing both v2 patches.

I found out that I can reproduce the spin using ovsdb-client/block, so
v3 won't add a test helper.

Cheers,

--    
Aeliton G. Silva 
  Desenvolvedor Especialista - MGC IAAS URP 
 


-- 




_‘Esta mensagem é direcionada apenas para os endereços constantes no 
cabeçalho inicial. Se você não está listado nos endereços constantes no 
cabeçalho, pedimos-lhe que desconsidere completamente o conteúdo dessa 
mensagem e cuja cópia, encaminhamento e/ou execução das ações citadas estão 
imediatamente anuladas e proibidas’._


* **‘Apesar do Magazine Luiza tomar 
todas as precauções razoáveis para assegurar que nenhum vírus esteja 
presente nesse e-mail, a empresa não poderá aceitar a responsabilidade por 
quaisquer perdas ou danos causados por esse e-mail ou por seus anexos’.*



_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to