sapling/eden/fs/takeover
Genevieve Helsel 003bdfe7a5 add additional takeover "ready" handshake
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
2020-04-07 09:52:21 -07:00
..
test Tidy up license headers 2019-10-11 05:28:23 -07:00
CMakeLists.txt fbcode_builder: rename add_thrift_cpp2_library() to add_fbthrift_cpp_library() 2019-08-29 16:45:12 -07:00
takeover.thrift Tidy up license headers 2019-10-11 05:28:23 -07:00
TakeoverClient.cpp add additional takeover "ready" handshake 2020-04-07 09:52:21 -07:00
TakeoverClient.h Tidy up license headers 2019-10-11 05:28:23 -07:00
TakeoverData.cpp add additional takeover "ready" handshake 2020-04-07 09:52:21 -07:00
TakeoverData.h add additional takeover "ready" handshake 2020-04-07 09:52:21 -07:00
TakeoverHandler.h Tidy up license headers 2019-10-11 05:28:23 -07:00
TakeoverServer.cpp add additional takeover "ready" handshake 2020-04-07 09:52:21 -07:00
TakeoverServer.h Tidy up license headers 2019-10-11 05:28:23 -07:00