mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 16:31:02 +03:00
003bdfe7a5
Summary: For graceful restart takeovers, we would like to implement an additional handshake. This handshake will occur right after the takeover data is ready to be sent to the client, but before actually sending it. This is to make sure the old daemon can recover in case of the client not being responsive (the client replies back to the server, and if no response is recieved in 5 seconds, the server will recover). There are a few cases here: * **Server sends ping (two cases discussed below)** I introduced a new ProtocolVersion. Daemons with this change will now have ProtocolVersion4. The Server checks the max version of the client, and if this version is ProtocolVersion4, we know the client can listen for pings. So we will send the ping. Otherwise, we don't send a ping. With this, we will only send pings if we know the client will be listening for one. The case in which a client isn't listening is if we adopt this change and we downgrade past the change. * **Server does not send ping and Client knows to listen for ping** This will be a common case immediately after this change. The client will parse the sent data and check if it matches the "ready" ping, and if it doesn't, the client assumes the server simply sent the Takeover Data. * **Server does not sends ping and Client doesn't know to listen for ping** This is the case before this change. Reviewed By: simpkins Differential Revision: D20290271 fbshipit-source-id: b68e4df6264fb071d770671a80e28c90ddb0d3f2 |
||
---|---|---|
.. | ||
test | ||
CMakeLists.txt | ||
takeover.thrift | ||
TakeoverClient.cpp | ||
TakeoverClient.h | ||
TakeoverData.cpp | ||
TakeoverData.h | ||
TakeoverHandler.h | ||
TakeoverServer.cpp | ||
TakeoverServer.h |