|
|
|
@ -1131,18 +1131,18 @@ static JsonBuilderObject configurationFetcher(Optional<DatabaseConfiguration> co
|
|
|
|
|
return statusObj;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ACTOR static Future<JsonBuilderObject> dataStatusFetcher(std::pair<WorkerInterface, ProcessClass> mWorker, int *minReplicasRemaining) {
|
|
|
|
|
ACTOR static Future<JsonBuilderObject> dataStatusFetcher(std::pair<WorkerInterface, ProcessClass> ddWorker, int *minReplicasRemaining) {
|
|
|
|
|
state JsonBuilderObject statusObjData;
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
std::vector<Future<TraceEventFields>> futures;
|
|
|
|
|
|
|
|
|
|
// TODO: Should this be serial?
|
|
|
|
|
futures.push_back(timeoutError(mWorker.first.eventLogRequest.getReply(EventLogRequest(LiteralStringRef("DDTrackerStarting"))), 1.0));
|
|
|
|
|
futures.push_back(timeoutError(mWorker.first.eventLogRequest.getReply(EventLogRequest(LiteralStringRef("DDTrackerStats"))), 1.0));
|
|
|
|
|
futures.push_back(timeoutError(mWorker.first.eventLogRequest.getReply(EventLogRequest(LiteralStringRef("MovingData"))), 1.0));
|
|
|
|
|
futures.push_back(timeoutError(mWorker.first.eventLogRequest.getReply(EventLogRequest(LiteralStringRef("TotalDataInFlight"))), 1.0));
|
|
|
|
|
futures.push_back(timeoutError(mWorker.first.eventLogRequest.getReply(EventLogRequest(LiteralStringRef("TotalDataInFlightRemote"))), 1.0));
|
|
|
|
|
futures.push_back(timeoutError(ddWorker.first.eventLogRequest.getReply(EventLogRequest(LiteralStringRef("DDTrackerStarting"))), 1.0));
|
|
|
|
|
futures.push_back(timeoutError(ddWorker.first.eventLogRequest.getReply(EventLogRequest(LiteralStringRef("DDTrackerStats"))), 1.0));
|
|
|
|
|
futures.push_back(timeoutError(ddWorker.first.eventLogRequest.getReply(EventLogRequest(LiteralStringRef("MovingData"))), 1.0));
|
|
|
|
|
futures.push_back(timeoutError(ddWorker.first.eventLogRequest.getReply(EventLogRequest(LiteralStringRef("TotalDataInFlight"))), 1.0));
|
|
|
|
|
futures.push_back(timeoutError(ddWorker.first.eventLogRequest.getReply(EventLogRequest(LiteralStringRef("TotalDataInFlightRemote"))), 1.0));
|
|
|
|
|
|
|
|
|
|
std::vector<TraceEventFields> dataInfo = wait(getAll(futures));
|
|
|
|
|
|
|
|
|
@ -1235,7 +1235,7 @@ ACTOR static Future<JsonBuilderObject> dataStatusFetcher(std::pair<WorkerInterfa
|
|
|
|
|
}
|
|
|
|
|
else if (highestPriority >= PRIORITY_TEAM_REDUNDANT) {
|
|
|
|
|
stateSectionObj["healthy"] = true;
|
|
|
|
|
stateSectionObj["name"] = "healthy_removing_redundant_teams";
|
|
|
|
|
stateSectionObj["name"] = "removing_redundant_teams";
|
|
|
|
|
stateSectionObj["description"] = "Removing redundant machine teams";
|
|
|
|
|
}
|
|
|
|
|
else if (highestPriority >= PRIORITY_MERGE_SHARD) {
|
|
|
|
@ -1388,7 +1388,7 @@ static int getExtraTLogEligibleMachines(const vector<std::pair<WorkerInterface,
|
|
|
|
|
return extraTlogEligibleMachines;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ACTOR static Future<JsonBuilderObject> workloadStatusFetcher(Reference<AsyncVar<struct ServerDBInfo>> db, vector<std::pair<WorkerInterface, ProcessClass>> workers, std::pair<WorkerInterface, ProcessClass> mWorker,
|
|
|
|
|
ACTOR static Future<JsonBuilderObject> workloadStatusFetcher(Reference<AsyncVar<struct ServerDBInfo>> db, vector<std::pair<WorkerInterface, ProcessClass>> workers, std::pair<WorkerInterface, ProcessClass> mWorker, std::pair<WorkerInterface, ProcessClass> ddWorker,
|
|
|
|
|
JsonBuilderObject *qos, JsonBuilderObject *data_overlay, std::set<std::string> *incomplete_reasons, Future<ErrorOr<vector<std::pair<StorageServerInterface, EventMap>>>> storageServerFuture)
|
|
|
|
|
{
|
|
|
|
|
state JsonBuilderObject statusObj;
|
|
|
|
@ -1440,7 +1440,7 @@ ACTOR static Future<JsonBuilderObject> workloadStatusFetcher(Reference<AsyncVar<
|
|
|
|
|
|
|
|
|
|
// Transactions
|
|
|
|
|
try {
|
|
|
|
|
TraceEventFields md = wait( timeoutError(mWorker.first.eventLogRequest.getReply( EventLogRequest(LiteralStringRef("RkUpdate") ) ), 1.0) );
|
|
|
|
|
TraceEventFields md = wait( timeoutError(ddWorker.first.eventLogRequest.getReply( EventLogRequest(LiteralStringRef("RkUpdate") ) ), 1.0) );
|
|
|
|
|
double tpsLimit = parseDouble(md.getValue("TPSLimit"));
|
|
|
|
|
double transPerSec = parseDouble(md.getValue("ReleasedTPS"));
|
|
|
|
|
int ssCount = parseInt(md.getValue("StorageServers"));
|
|
|
|
@ -1820,6 +1820,7 @@ ACTOR Future<StatusReply> clusterGetStatus(
|
|
|
|
|
state JsonBuilderArray messages;
|
|
|
|
|
state std::set<std::string> status_incomplete_reasons;
|
|
|
|
|
state std::pair<WorkerInterface, ProcessClass> mWorker;
|
|
|
|
|
state std::pair<WorkerInterface, ProcessClass> ddWorker; // DataDistributor worker
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
// Get the master Worker interface
|
|
|
|
@ -1829,6 +1830,17 @@ ACTOR Future<StatusReply> clusterGetStatus(
|
|
|
|
|
} else {
|
|
|
|
|
messages.push_back(JsonString::makeMessage("unreachable_master_worker", "Unable to locate the master worker."));
|
|
|
|
|
}
|
|
|
|
|
// Get the DataDistributor worker interface
|
|
|
|
|
Optional<std::pair<WorkerInterface, ProcessClass>> _ddWorker;
|
|
|
|
|
if (db->get().distributor.present()) {
|
|
|
|
|
_ddWorker = getWorker( workers, db->get().distributor.get().address() );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!db->get().distributor.present() || !_ddWorker.present()) {
|
|
|
|
|
messages.push_back(JsonString::makeMessage("unreachable_dataDistributor_worker", "Unable to locate the data distributor worker."));
|
|
|
|
|
} else {
|
|
|
|
|
ddWorker = _ddWorker.get();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Get latest events for various event types from ALL workers
|
|
|
|
|
// WorkerEvents is a map of worker's NetworkAddress to its event string
|
|
|
|
@ -1932,8 +1944,8 @@ ACTOR Future<StatusReply> clusterGetStatus(
|
|
|
|
|
|
|
|
|
|
state int minReplicasRemaining = -1;
|
|
|
|
|
std::vector<Future<JsonBuilderObject>> futures2;
|
|
|
|
|
futures2.push_back(dataStatusFetcher(mWorker, &minReplicasRemaining));
|
|
|
|
|
futures2.push_back(workloadStatusFetcher(db, workers, mWorker, &qos, &data_overlay, &status_incomplete_reasons, storageServerFuture));
|
|
|
|
|
futures2.push_back(dataStatusFetcher(ddWorker, &minReplicasRemaining));
|
|
|
|
|
futures2.push_back(workloadStatusFetcher(db, workers, mWorker, ddWorker, &qos, &data_overlay, &status_incomplete_reasons, storageServerFuture));
|
|
|
|
|
futures2.push_back(layerStatusFetcher(cx, &messages, &status_incomplete_reasons));
|
|
|
|
|
futures2.push_back(lockedStatusFetcher(db, &messages, &status_incomplete_reasons));
|
|
|
|
|
|
|
|
|
|