mirror of
https://github.com/XTXMarkets/ternfs.git
synced 2026-01-06 02:49:45 -06:00
Allow to disable shuckle stat inserting
This commit is contained in:
@@ -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)));
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ struct CDCOptions {
|
||||
bool xmon = false;
|
||||
bool xmonProd = false;
|
||||
bool metrics = false;
|
||||
bool shuckleStats = false;
|
||||
ReplicaId replicaId = 0;
|
||||
ReplicaId leaderReplicaId = 0;
|
||||
};
|
||||
|
||||
@@ -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)));
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user