remove print statements and format protocol version workload
This commit is contained in:
parent
df37751f6f
commit
5f57d72a59
|
@ -4193,8 +4193,6 @@ ACTOR Future<ProtocolVersion> coordinatorProtocolsFetcher(Reference<ClusterConne
|
|||
}
|
||||
|
||||
ACTOR Future<uint64_t> getCoordinatorProtocols(Reference<ClusterConnectionFile> f) {
|
||||
// TODO: let client know if server is present but before this feature is introduced
|
||||
std::cout << "MAKING GET PROTOCOL REQUEST" << std::endl;
|
||||
ProtocolVersion protocolVersion = wait(coordinatorProtocolsFetcher(f));
|
||||
return protocolVersion.version();
|
||||
}
|
||||
|
|
|
@ -181,6 +181,7 @@ struct EndpointNotFoundReceiver final : NetworkMessageReceiver {
|
|||
}
|
||||
|
||||
void receive(ArenaObjectReader& reader) override {
|
||||
// Remote machine tells us it doesn't have endpoint e
|
||||
Endpoint e;
|
||||
reader.deserialize(e);
|
||||
IFailureMonitor::failureMonitor().endpointNotFound(e);
|
||||
|
|
|
@ -21,41 +21,31 @@
|
|||
#include "fdbserver/workloads/workloads.actor.h"
|
||||
|
||||
struct ProtocolVersionWorkload : TestWorkload {
|
||||
ProtocolVersionWorkload(WorkloadContext const& wcx)
|
||||
: TestWorkload(wcx) {
|
||||
|
||||
}
|
||||
ProtocolVersionWorkload(WorkloadContext const& wcx) : TestWorkload(wcx) {}
|
||||
|
||||
std::string description() const override {
|
||||
return "ProtocolVersionWorkload";
|
||||
}
|
||||
std::string description() const override { return "ProtocolVersionWorkload"; }
|
||||
|
||||
Future<Void> start(Database const& cx) override {
|
||||
return _start(this, cx);
|
||||
}
|
||||
Future<Void> start(Database const& cx) override { return _start(this, cx); }
|
||||
|
||||
ACTOR Future<Void> _start(ProtocolVersionWorkload* self, Database cx) {
|
||||
state std::vector<ISimulator::ProcessInfo*> allProcesses = g_pSimulator->getAllProcesses();
|
||||
state std::vector<ISimulator::ProcessInfo*>::iterator diffVersionProcess = find_if(allProcesses.begin(), allProcesses.end(), [](const ISimulator::ProcessInfo* p){
|
||||
return p->protocolVersion != currentProtocolVersion;
|
||||
});
|
||||
|
||||
ASSERT(diffVersionProcess != allProcesses.end());
|
||||
ACTOR Future<Void> _start(ProtocolVersionWorkload* self, Database cx) {
|
||||
state std::vector<ISimulator::ProcessInfo*> allProcesses = g_pSimulator->getAllProcesses();
|
||||
state std::vector<ISimulator::ProcessInfo*>::iterator diffVersionProcess =
|
||||
find_if(allProcesses.begin(), allProcesses.end(),
|
||||
[](const ISimulator::ProcessInfo* p) { return p->protocolVersion != currentProtocolVersion; });
|
||||
|
||||
RequestStream<ProtocolInfoRequest> requestStream{ Endpoint{ { (*diffVersionProcess)->addresses }, WLTOKEN_PROTOCOL_INFO } };
|
||||
ProtocolInfoReply reply = wait(retryBrokenPromise(requestStream, ProtocolInfoRequest{}));
|
||||
|
||||
ASSERT(reply.version != g_network->protocolVersion());
|
||||
ASSERT(diffVersionProcess != allProcesses.end());
|
||||
|
||||
RequestStream<ProtocolInfoRequest> requestStream{ Endpoint{ { (*diffVersionProcess)->addresses },
|
||||
WLTOKEN_PROTOCOL_INFO } };
|
||||
ProtocolInfoReply reply = wait(retryBrokenPromise(requestStream, ProtocolInfoRequest{}));
|
||||
|
||||
ASSERT(reply.version != g_network->protocolVersion());
|
||||
return Void();
|
||||
}
|
||||
|
||||
Future<bool> check(Database const& cx) override {
|
||||
return true;
|
||||
}
|
||||
Future<bool> check(Database const& cx) override { return true; }
|
||||
|
||||
void getMetrics(vector<PerfMetric>& m) override {
|
||||
}
|
||||
void getMetrics(vector<PerfMetric>& m) override {}
|
||||
};
|
||||
|
||||
WorkloadFactory<ProtocolVersionWorkload> ProtocolVersionWorkloadFactory("ProtocolVersion");
|
||||
|
Loading…
Reference in New Issue