[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Nbd] NBD_CMD_DISC



On Wed, Apr 06, 2016 at 02:32:59PM -0600, Eric Blake wrote:
> New client, old server: server does not send reply, client is stuck
> waiting for a reply that never comes.  But since the server will close
> the connection, the client can detect that the connection is closed.
> Client is no worse off than old->old case.

This seems to work.

> New client, new server: server sends reply, and client waits for reply.
> No more traffic will be sent from either end, and both ends know that
> they need to close the connection; either end can close first without
> hurting the other.

This will be effectively the same thing. The reply to NBD_CMD_DISC could
even have the FIN flag set, too, resulting in no net benefit to the
above.

We can just say that the client MUST ensure that enough time has elapsed
for the TLS layer to pass the NBD_CMD_DISC command on to the server, and
SHOULD wait for the server to close the connection, rather than doing it
itself (SHOULD, because the server may have died and the client should
be allowed to time out).

[...]
> In other words, I'm not seeing what value added we have in either choice
> 2 or choice 3 (what behavior did we guarantee by extending the
> handshake, that we cannot already get by specifying best practice that
> server MUST reply, and client SHOULD wait for server to close connection
> but SHOULD NOT expect the reply due to back-compat?)

Not much. Even the reply doesn't seem necessary to me.

> So it may just be a matter of requiring servers to reply, and requiring
> clients to wait for the server to close the connection unless a reply is
> received (ie. any time the client closes the connection first without
> getting a reply may cause the server to treat shutdown as unclean and
> behave differently).  Plus an ordering constraint: the server MUST NOT
> reply until after all other pending requests have had replies sent.

Right.

-- 
< ron> I mean, the main *practical* problem with C++, is there's like a dozen
       people in the world who think they really understand all of its rules,
       and pretty much all of them are just lying to themselves too.
 -- #debian-devel, OFTC, 2016-02-12



Reply to: