Remove defunct DebugQueryRequest.
This commit is contained in:
parent
8bf67c7afc
commit
7f0a70db7f
|
@ -44,7 +44,6 @@ struct WorkerInterface {
|
|||
RequestStream< struct InitializeStorageRequest > storage;
|
||||
RequestStream< struct InitializeLogRouterRequest > logRouter;
|
||||
|
||||
RequestStream< struct DebugQueryRequest > debugQuery;
|
||||
RequestStream< struct LoadedPingRequest > debugPing;
|
||||
RequestStream< struct CoordinationPingMessage > coordinationPing;
|
||||
RequestStream< ReplyPromise<Void> > waitFailure;
|
||||
|
@ -63,7 +62,7 @@ struct WorkerInterface {
|
|||
|
||||
template <class Ar>
|
||||
void serialize(Ar& ar) {
|
||||
ar & clientInterface & locality & tLog & master & masterProxy & resolver & storage & logRouter & debugQuery & debugPing & coordinationPing & waitFailure & setMetricsRate & eventLogRequest & traceBatchDumpRequest & testerInterface & diskStoreRequest;
|
||||
ar & clientInterface & locality & tLog & master & masterProxy & resolver & storage & logRouter & debugPing & coordinationPing & waitFailure & setMetricsRate & eventLogRequest & traceBatchDumpRequest & testerInterface & diskStoreRequest;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -239,16 +238,6 @@ struct EventLogRequest {
|
|||
}
|
||||
};
|
||||
|
||||
struct DebugQueryRequest {
|
||||
Standalone<StringRef> search;
|
||||
ReplyPromise< Standalone< VectorRef<struct DebugEntryRef> > > reply;
|
||||
|
||||
template <class Ar>
|
||||
void serialize(Ar& ar) {
|
||||
ar & search & reply;
|
||||
}
|
||||
};
|
||||
|
||||
struct DebugEntryRef {
|
||||
double time;
|
||||
NetworkAddress address;
|
||||
|
@ -339,7 +328,6 @@ Future<Void> storageServer(
|
|||
Future<Void> masterServer( MasterInterface const& mi, Reference<AsyncVar<ServerDBInfo>> const& db, class ServerCoordinators const&, LifetimeToken const& lifetime, bool const& forceRecovery );
|
||||
Future<Void> masterProxyServer(MasterProxyInterface const& proxy, InitializeMasterProxyRequest const& req, Reference<AsyncVar<ServerDBInfo>> const& db);
|
||||
Future<Void> tLog( class IKeyValueStore* const& persistentData, class IDiskQueue* const& persistentQueue, Reference<AsyncVar<ServerDBInfo>> const& db, LocalityData const& locality, PromiseStream<InitializeTLogRequest> const& tlogRequests, UID const& tlogId, bool const& restoreFromDisk, Promise<Void> const& oldLog, Promise<Void> const& recovered ); // changes tli->id() to be the recovered ID
|
||||
Future<Void> debugQueryServer( DebugQueryRequest const& req );
|
||||
Future<Void> monitorServerDBInfo( Reference<AsyncVar<Optional<ClusterControllerFullInterface>>> const& ccInterface, Reference<ClusterConnectionFile> const&, LocalityData const&, Reference<AsyncVar<ServerDBInfo>> const& dbInfo );
|
||||
Future<Void> resolver( ResolverInterface const& proxy, InitializeResolverRequest const&, Reference<AsyncVar<ServerDBInfo>> const& db );
|
||||
Future<Void> logRouter( TLogInterface const& interf, InitializeLogRouterRequest const& req, Reference<AsyncVar<ServerDBInfo>> const& db );
|
||||
|
|
|
@ -247,75 +247,6 @@ bool debugMutation( const char* context, Version version, MutationRef const& mut
|
|||
bool debugKeyRange( const char* context, Version version, KeyRangeRef const& keys ) { return false; }
|
||||
#endif
|
||||
|
||||
Future<Void> debugQueryServer( DebugQueryRequest const& req ) {
|
||||
Standalone<VectorRef<DebugEntryRef>> reply;
|
||||
|
||||
for(auto v = debugEntries.begin(); v != debugEntries.end(); ++v)
|
||||
for(auto m = v->begin(); m != v->end(); ++m) {
|
||||
if (m->mutation.type == m->mutation.ClearRange || m->mutation.type == m->mutation.DebugKeyRange) {
|
||||
if (!KeyRangeRef(m->mutation.param1, m->mutation.param2).contains( req.search ))
|
||||
continue;
|
||||
} else if (m->mutation.type == m->mutation.SetValue) {
|
||||
if (m->mutation.param1 != req.search)
|
||||
continue;
|
||||
}
|
||||
reply.push_back( reply.arena(), *m );
|
||||
}
|
||||
|
||||
req.reply.send(reply);
|
||||
return Void();
|
||||
}
|
||||
|
||||
auto sortByTime = [](DebugEntryRef const& a, DebugEntryRef const& b) { return a.time < b.time; };
|
||||
|
||||
/*ACTOR Future<Void> debugSearchMutationCluster( ZookeeperInterface zk, Key key ) {
|
||||
state ZKWatch<ClusterControllerFullInterface> ccWatch(zk, LiteralStringRef("ClusterController"));
|
||||
state ClusterControllerFullInterface cc = wait( ccWatch.get() );
|
||||
|
||||
ASSERT( ccWatch.getLastVersion() );
|
||||
|
||||
Optional<vector<WorkerInterface>> workerList = wait( cc.getWorkers.tryGetReply( GetWorkersRequest() ) );
|
||||
if( !workerList.present() ) {
|
||||
printf("ERROR: CC interface not in ZK\n");
|
||||
return Void();
|
||||
}
|
||||
state vector<WorkerInterface> workers = workerList.get();
|
||||
|
||||
state vector<Future<Standalone<VectorRef<DebugEntryRef>>>> replies( workers.size() );
|
||||
for(int w=0; w<workers.size(); w++) {
|
||||
DebugQueryRequest req;
|
||||
req.search = key;
|
||||
replies[w] = timeoutError(workers[w].debugQuery.getReply( req ), 5.0);
|
||||
}
|
||||
//state vector<Standalone<VectorRef<DebugEntryRef>>> result = wait( getAll( replies ) );
|
||||
wait(waitForAllReady( replies ));
|
||||
state vector<Standalone<VectorRef<DebugEntryRef>>> result( workers.size() );
|
||||
for(int r=0; r<result.size(); r++) {
|
||||
if (replies[r].isError())
|
||||
printf("ERROR: Couldn't get results from '%s'\n", workers[r].debugQuery.getEndpoint().address.toString().c_str());
|
||||
else
|
||||
result[r] = replies[r].get();
|
||||
}
|
||||
ASSERT( result.size() == workers.size() );
|
||||
|
||||
Standalone<VectorRef<DebugEntryRef>> all;
|
||||
for(int r=0; r<result.size(); r++)
|
||||
all.append( all.arena(), &result[r][0], result[r].size() );
|
||||
std::sort( all.begin(), all.end(), sortByTime );
|
||||
printf("\n\n");
|
||||
for(auto e = all.begin(); e != all.end(); ++e) {
|
||||
const char* type =
|
||||
e->mutation.type == MutationRef::SetValue ? "SetValue" :
|
||||
e->mutation.type == MutationRef::ClearRange ? "ClearRange" :
|
||||
e->mutation.type == MutationRef::DebugKeyRange ? "DebugKeyRange" :
|
||||
"UnknownMutation";
|
||||
printf("%.6f\t%s\t%s\t%lld\t%s\t%s\t%s\n", e->time, e->address.toString().c_str(), e->context.toString().c_str(), e->version, type, printable(e->mutation.param1).c_str(), printable(e->mutation.param2).c_str());
|
||||
}
|
||||
printf("\n\n");
|
||||
|
||||
return Void();
|
||||
}*/
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <sddl.h>
|
||||
|
||||
|
|
|
@ -539,7 +539,6 @@ ACTOR Future<Void> workerServer( Reference<ClusterConnectionFile> connFile, Refe
|
|||
DUMPTOKEN(recruited.masterProxy);
|
||||
DUMPTOKEN(recruited.resolver);
|
||||
DUMPTOKEN(recruited.storage);
|
||||
DUMPTOKEN(recruited.debugQuery);
|
||||
DUMPTOKEN(recruited.debugPing);
|
||||
DUMPTOKEN(recruited.coordinationPing);
|
||||
DUMPTOKEN(recruited.waitFailure);
|
||||
|
@ -805,7 +804,6 @@ ACTOR Future<Void> workerServer( Reference<ClusterConnectionFile> connFile, Refe
|
|||
logRouter( recruited, req, dbInfo ) ) ) );
|
||||
req.reply.send(recruited);
|
||||
}
|
||||
when( DebugQueryRequest req = waitNext(interf.debugQuery.getFuture()) ) { }
|
||||
when( CoordinationPingMessage m = waitNext( interf.coordinationPing.getFuture() ) ) {
|
||||
TraceEvent("CoordinationPing", interf.id()).detail("CCID", m.clusterControllerId).detail("TimeStep", m.timeStep);
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ using namespace boost::asio::ip;
|
|||
//
|
||||
// xyzdev
|
||||
// vvvv
|
||||
const uint64_t currentProtocolVersion = 0x0FDB00B061010001LL;
|
||||
const uint64_t currentProtocolVersion = 0x0FDB00B061020001LL;
|
||||
const uint64_t compatibleProtocolVersionMask = 0xffffffffffff0000LL;
|
||||
const uint64_t minValidProtocolVersion = 0x0FDB00A200060001LL;
|
||||
|
||||
|
|
Loading…
Reference in New Issue