Merge pull request #9033 from sbodagala/main

Extend "ProcessMetrics" to include FoundationDB version
This commit is contained in:
Jingyu Zhou 2022-12-13 08:58:07 -08:00 committed by GitHub
commit 0edfc27459
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 6 deletions

View File

@ -509,8 +509,8 @@ Future<Void> startSystemMonitor(std::string dataFolder,
Optional<Standalone<StringRef>> dcId,
Optional<Standalone<StringRef>> zoneId,
Optional<Standalone<StringRef>> machineId) {
initializeSystemMonitorMachineState(
SystemMonitorMachineState(dataFolder, dcId, zoneId, machineId, g_network->getLocalAddress().ip));
initializeSystemMonitorMachineState(SystemMonitorMachineState(
dataFolder, dcId, zoneId, machineId, g_network->getLocalAddress().ip, FDB_VT_VERSION));
systemMonitor();
return recurring(&systemMonitor, SERVER_KNOBS->SYSTEM_MONITOR_FREQUENCY, TaskPriority::FlushTrace);

View File

@ -30,6 +30,7 @@
#include "fdbclient/GlobalConfig.actor.h"
#include "fdbclient/ProcessInterface.h"
#include "fdbclient/StorageServerInterface.h"
#include "fdbclient/versions.h"
#include "fdbserver/Knobs.h"
#include "flow/ActorCollection.h"
#include "flow/Error.h"
@ -1828,8 +1829,12 @@ ACTOR Future<Void> workerServer(Reference<IClusterConnectionRecord> connRecord,
filesClosed.add(stopping.getFuture());
initializeSystemMonitorMachineState(SystemMonitorMachineState(
folder, locality.dcId(), locality.zoneId(), locality.machineId(), g_network->getLocalAddress().ip));
initializeSystemMonitorMachineState(SystemMonitorMachineState(folder,
locality.dcId(),
locality.zoneId(),
locality.machineId(),
g_network->getLocalAddress().ip,
FDB_VT_VERSION));
{
auto recruited = interf;

View File

@ -151,6 +151,7 @@ SystemStatistics customSystemMonitor(std::string const& eventName, StatisticsSta
.detail("DCID", machineState.dcId)
.detail("ZoneID", machineState.zoneId)
.detail("MachineID", machineState.machineId)
.detail("Version", machineState.fdbVersion)
.detail("AIOSubmitCount", netData.countAIOSubmit - statState->networkState.countAIOSubmit)
.detail("AIOCollectCount", netData.countAIOCollect - statState->networkState.countAIOCollect)
.detail("AIOSubmitLag",

View File

@ -31,6 +31,7 @@ struct SystemMonitorMachineState {
Optional<Standalone<StringRef>> zoneId;
Optional<Standalone<StringRef>> machineId;
Optional<IPAddress> ip;
Optional<std::string> fdbVersion;
double monitorStartTime;
@ -40,8 +41,10 @@ struct SystemMonitorMachineState {
Optional<Standalone<StringRef>> const& dcId,
Optional<Standalone<StringRef>> const& zoneId,
Optional<Standalone<StringRef>> const& machineId,
IPAddress const& ip)
: folder(folder), dcId(dcId), zoneId(zoneId), machineId(machineId), ip(ip), monitorStartTime(0) {}
IPAddress const& ip,
std::string const& fdbVersion)
: folder(folder), dcId(dcId), zoneId(zoneId), machineId(machineId), ip(ip), monitorStartTime(0),
fdbVersion(fdbVersion) {}
};
void initializeSystemMonitorMachineState(SystemMonitorMachineState machineState);