change protocol version to hex encoded string in status json. Move constant from flow transport header to cpp
This commit is contained in:
parent
a671aa773e
commit
5b546c4854
|
@ -787,7 +787,7 @@ const KeyRef JSONSchemas::statusSchema = LiteralStringRef(R"statusSchema(
|
|||
{
|
||||
"reachable":true,
|
||||
"address":"127.0.0.1:4701",
|
||||
"protocol": 1142507688261910528
|
||||
"protocol": "0fdb00b070010001"
|
||||
}
|
||||
],
|
||||
"quorum_reachable":true
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "fdbclient/json_spirit/json_spirit_reader_template.h"
|
||||
#include "fdbrpc/genericactors.actor.h"
|
||||
#include "flow/actorcompiler.h" // has to be last include
|
||||
#include <cstdint>
|
||||
|
||||
json_spirit::mValue readJSONStrictly(const std::string &s) {
|
||||
json_spirit::mValue val;
|
||||
|
@ -320,7 +321,10 @@ ACTOR Future<Optional<StatusObject>> clientCoordinatorsStatusFetcher(Reference<C
|
|||
coordStatus["reachable"] = false;
|
||||
}
|
||||
if (coordProtocols[i].isReady()) {
|
||||
coordStatus["protocol"] = coordProtocols[i].get().version.version();
|
||||
uint64_t protocolVersionInt = coordProtocols[i].get().version.version();
|
||||
std::stringstream hexSs;
|
||||
hexSs << std::hex << std::setw(2*sizeof(protocolVersionInt)) << std::setfill('0') << protocolVersionInt;
|
||||
coordStatus["protocol"] = hexSs.str();
|
||||
}
|
||||
coordsStatus.push_back(coordStatus);
|
||||
}
|
||||
|
|
|
@ -48,6 +48,7 @@ static NetworkAddressList g_currentDeliveryPeerAddress = NetworkAddressList();
|
|||
|
||||
constexpr UID WLTOKEN_ENDPOINT_NOT_FOUND(-1, 0);
|
||||
constexpr UID WLTOKEN_PING_PACKET(-1, 1);
|
||||
constexpr int PACKET_LEN_WIDTH = sizeof(uint32_t);
|
||||
const uint64_t TOKEN_STREAM_FLAG = 1;
|
||||
|
||||
class EndpointMap : NonCopyable {
|
||||
|
|
|
@ -254,6 +254,4 @@ inline bool Endpoint::isLocal() const {
|
|||
return addresses.address == localAddrs.address || (localAddrs.secondaryAddress.present() && addresses.address == localAddrs.secondaryAddress.get());
|
||||
}
|
||||
|
||||
const int PACKET_LEN_WIDTH = sizeof(uint32_t);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue