Allow to disable shuckle stat inserting

This commit is contained in:
Francesco Mazzoli
2024-03-25 16:08:54 +00:00
parent 33e602d0f2
commit 7a5fc9f8a9
5 changed files with 12 additions and 2 deletions

View File

@@ -1094,7 +1094,9 @@ void runCDC(const std::string& dbDir, const CDCOptions& options) {
threads.emplace_back(LoopThread::Spawn(std::make_unique<CDCShardUpdater>(logger, xmon, options, shared)));
threads.emplace_back(LoopThread::Spawn(std::make_unique<CDCRegisterer>(logger, xmon, options, shared)));
threads.emplace_back(LoopThread::Spawn(std::make_unique<CDCStatsInserter>(logger, xmon, options, shared)));
if (options.shuckleStats) {
threads.emplace_back(LoopThread::Spawn(std::make_unique<CDCStatsInserter>(logger, xmon, options, shared)));
}
if (options.metrics) {
threads.emplace_back(LoopThread::Spawn(std::make_unique<CDCMetricsInserter>(logger, xmon, shared)));
}

View File

@@ -18,6 +18,7 @@ struct CDCOptions {
bool xmon = false;
bool xmonProd = false;
bool metrics = false;
bool shuckleStats = false;
ReplicaId replicaId = 0;
ReplicaId leaderReplicaId = 0;
};

View File

@@ -1483,7 +1483,9 @@ void runShard(ShardReplicaId shrid, const std::string& dbDir, ShardOptions& opti
threads.emplace_back(LoopThread::Spawn(std::make_unique<ShardWriter>(logger, xmon, shrid, options, shared)));
threads.emplace_back(LoopThread::Spawn(std::make_unique<ShardRegisterer>(logger, xmon, shrid, options, shared)));
threads.emplace_back(LoopThread::Spawn(std::make_unique<ShardBlockServiceUpdater>(logger, xmon, shrid, options, shared)));
threads.emplace_back(LoopThread::Spawn(std::make_unique<ShardStatsInserter>(logger, xmon, shrid, options, shared)));
if (options.shuckleStats) {
threads.emplace_back(LoopThread::Spawn(std::make_unique<ShardStatsInserter>(logger, xmon, shrid, options, shared)));
}
if (options.metrics) {
threads.emplace_back(LoopThread::Spawn(std::make_unique<ShardMetricsInserter>(logger, xmon, shrid, shared)));
}

View File

@@ -27,6 +27,7 @@ struct ShardOptions {
bool xmon = false;
bool xmonProd = false;
bool metrics = false;
bool shuckleStats = false;
Duration transientDeadlineInterval = DEFAULT_DEADLINE_INTERVAL;
// LogsDB settings

View File

@@ -43,6 +43,8 @@ static void usage(const char* binary) {
fprintf(stderr, " Force forward last released. Used for manual leader election. Can not be combined with starting in any LEADER mode\n");
fprintf(stderr, " -clear-logsdb-data\n");
fprintf(stderr, " Removes all data in LogsDB. It can not be used in combination with -use-logsdb to avoid accidental use.\n");
fprintf(stderr, " -shuckle-stats\n");
fprintf(stderr, " Insert shuckle histogram stats.\n");
}
static double parseDouble(const std::string& arg) {
@@ -196,6 +198,8 @@ int main(int argc, char** argv) {
}
} else if (arg == "-metrics") {
options.metrics = true;
} else if (arg == "-shuckle-stats") {
options.shuckleStats = true;
} else if (arg == "-transient-deadline-interval") {
options.transientDeadlineInterval = parseDuration(getNextArg());
} else if (arg == "-use-logsdb") {