summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobot-piglet <[email protected]>2026-07-17 12:26:27 +0300
committerrobot-piglet <[email protected]>2026-07-17 19:05:49 +0300
commit3488922ca14ce7cd0239348a2baf4ef2055ddbd1 (patch)
treea4bf641ed12a76e57585dbcc5665186001c3c3f1
parent6b314f55c6232352d89a5a7dd4a1e7734a56a2a2 (diff)
Intermediate changes
commit_hash:eec33221ed9e1cb593f4bf434a7f6986ec14bd02
-rw-r--r--yt/yt/library/profiling/solomon/config.cpp22
-rw-r--r--yt/yt/library/profiling/solomon/config.h17
-rw-r--r--yt/yt/library/profiling/solomon/exporter.cpp7
-rw-r--r--yt/yt/library/profiling/solomon/exporter.h2
-rw-r--r--yt/yt/library/profiling/solomon/public.h1
5 files changed, 49 insertions, 0 deletions
diff --git a/yt/yt/library/profiling/solomon/config.cpp b/yt/yt/library/profiling/solomon/config.cpp
index dc0a40a50fd..2f0713ce00b 100644
--- a/yt/yt/library/profiling/solomon/config.cpp
+++ b/yt/yt/library/profiling/solomon/config.cpp
@@ -32,6 +32,28 @@ void TSolomonRegistryDynamicConfig::Register(TRegistrar registrar)
////////////////////////////////////////////////////////////////////////////////
+void TSolomonExporterDynamicConfig::Register(TRegistrar registrar)
+{
+ registrar.Parameter("thread_pool_size", &TThis::ThreadPoolSize)
+ .Default();
+ registrar.Parameter("thread_pool_polling_period", &TThis::ThreadPoolPollingPeriod)
+ .Default();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+TSolomonExporterConfigPtr TSolomonExporterConfig::ApplyDynamic(
+ const TSolomonExporterDynamicConfigPtr& dynamicConfig) const
+{
+ auto result = CloneYsonStruct(MakeStrong(this));
+ NYTree::UpdateYsonStructField(result->ThreadPoolSize, dynamicConfig->ThreadPoolSize);
+ NYTree::UpdateYsonStructField(result->ThreadPoolPollingPeriod, dynamicConfig->ThreadPoolPollingPeriod);
+ result->Postprocess();
+ return result;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
void TShardConfig::Register(TRegistrar registrar)
{
registrar.Parameter("filter", &TThis::Filter)
diff --git a/yt/yt/library/profiling/solomon/config.h b/yt/yt/library/profiling/solomon/config.h
index 74484cff084..e1b35df322a 100644
--- a/yt/yt/library/profiling/solomon/config.h
+++ b/yt/yt/library/profiling/solomon/config.h
@@ -59,6 +59,21 @@ DEFINE_REFCOUNTED_TYPE(TSolomonRegistryDynamicConfig)
////////////////////////////////////////////////////////////////////////////////
+struct TSolomonExporterDynamicConfig
+ : public NYTree::TYsonStruct
+{
+ std::optional<int> ThreadPoolSize;
+ std::optional<TDuration> ThreadPoolPollingPeriod;
+
+ REGISTER_YSON_STRUCT(TSolomonExporterDynamicConfig);
+
+ static void Register(TRegistrar registrar);
+};
+
+DEFINE_REFCOUNTED_TYPE(TSolomonExporterDynamicConfig)
+
+////////////////////////////////////////////////////////////////////////////////
+
struct TSolomonExporterConfig
: public NYTree::TYsonStruct
{
@@ -122,6 +137,8 @@ struct TSolomonExporterConfig
ELabelSanitizationPolicy LabelSanitizationPolicy;
+ TSolomonExporterConfigPtr ApplyDynamic(const TSolomonExporterDynamicConfigPtr& dynamicConfig) const;
+
TShardConfigPtr MatchShard(TStringBuf sensorName);
ESummaryPolicy GetSummaryPolicy() const;
diff --git a/yt/yt/library/profiling/solomon/exporter.cpp b/yt/yt/library/profiling/solomon/exporter.cpp
index dd2304fb6de..269d01b403a 100644
--- a/yt/yt/library/profiling/solomon/exporter.cpp
+++ b/yt/yt/library/profiling/solomon/exporter.cpp
@@ -166,6 +166,13 @@ void TSolomonExporter::Stop()
EncodingOffloadThreadPool_->Shutdown();
}
+void TSolomonExporter::Reconfigure(const TSolomonExporterDynamicConfigPtr& dynamicConfig)
+{
+ auto config = Config_->ApplyDynamic(dynamicConfig);
+ OffloadThreadPool_->SetThreadCount(config->ThreadPoolSize);
+ OffloadThreadPool_->SetPollingPeriod(config->ThreadPoolPollingPeriod);
+}
+
void TSolomonExporter::TransferSensors()
{
std::vector<std::pair<TFuture<TSharedRef>, TIntrusivePtr<TRemoteProcess>>> remoteFutures;
diff --git a/yt/yt/library/profiling/solomon/exporter.h b/yt/yt/library/profiling/solomon/exporter.h
index d99a735e12b..3e0c26841e2 100644
--- a/yt/yt/library/profiling/solomon/exporter.h
+++ b/yt/yt/library/profiling/solomon/exporter.h
@@ -53,6 +53,8 @@ public:
void Start();
void Stop();
+ void Reconfigure(const TSolomonExporterDynamicConfigPtr& dynamicConfig);
+
NYTree::IYPathServicePtr GetSensorService();
const TSolomonRegistryPtr& GetRegistry() const;
diff --git a/yt/yt/library/profiling/solomon/public.h b/yt/yt/library/profiling/solomon/public.h
index 4eb3c098d01..7caf09a280e 100644
--- a/yt/yt/library/profiling/solomon/public.h
+++ b/yt/yt/library/profiling/solomon/public.h
@@ -11,6 +11,7 @@ namespace NYT::NProfiling {
DECLARE_REFCOUNTED_STRUCT(TShardConfig)
DECLARE_REFCOUNTED_STRUCT(TSolomonExporterConfig)
+DECLARE_REFCOUNTED_STRUCT(TSolomonExporterDynamicConfig)
DECLARE_REFCOUNTED_STRUCT(TSolomonProxyConfig)
DECLARE_REFCOUNTED_STRUCT(TSolomonRegistryConfig)
DECLARE_REFCOUNTED_STRUCT(TSolomonRegistryDynamicConfig)