diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2023-11-17 17:34:45 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2023-11-17 18:25:35 +0300 |
commit | d7d17262e3cb1703c5d7fdf12bcf35c0b3f785cb (patch) | |
tree | 2ce9060ed8231becba3f383e6926ddae8d23b1c9 | |
parent | 456358031cbc26a8bad82be413b6ed51d99e7802 (diff) | |
download | ydb-d7d17262e3cb1703c5d7fdf12bcf35c0b3f785cb.tar.gz |
Intermediate changes
-rw-r--r-- | yt/yt/client/cache/rpc.cpp | 5 | ||||
-rw-r--r-- | yt/yt/library/profiling/solomon/exporter.cpp | 11 | ||||
-rw-r--r-- | yt/yt_proto/yt/client/cache/proto/config.proto | 1 |
3 files changed, 11 insertions, 6 deletions
diff --git a/yt/yt/client/cache/rpc.cpp b/yt/yt/client/cache/rpc.cpp index 7261b813a7..1af59b48c9 100644 --- a/yt/yt/client/cache/rpc.cpp +++ b/yt/yt/client/cache/rpc.cpp @@ -16,7 +16,7 @@ namespace NYT::NClient::NCache { //////////////////////////////////////////////////////////////////////////////// -NCompression::ECodec GetResponseCodecFromProto(ECompressionCodec protoCodec) +NCompression::ECodec GetCompressionCodecFromProto(ECompressionCodec protoCodec) { switch (protoCodec) { case ECompressionCodec::None: @@ -58,7 +58,8 @@ NApi::NRpcProxy::TConnectionConfigPtr GetConnectionConfig(const TConfig& config) #undef SET_TIMEOUT_OPTION - connectionConfig->ResponseCodec = GetResponseCodecFromProto(config.GetResponseCodec()); + connectionConfig->RequestCodec = GetCompressionCodecFromProto(config.GetRequestCodec()); + connectionConfig->ResponseCodec = GetCompressionCodecFromProto(config.GetResponseCodec()); connectionConfig->EnableRetries = config.GetEnableRetries(); if (config.HasRetryBackoffTime()) { diff --git a/yt/yt/library/profiling/solomon/exporter.cpp b/yt/yt/library/profiling/solomon/exporter.cpp index 8fca744ebb..6cbb80632d 100644 --- a/yt/yt/library/profiling/solomon/exporter.cpp +++ b/yt/yt/library/profiling/solomon/exporter.cpp @@ -401,11 +401,11 @@ constexpr auto IndexPage = R"EOF( <!DOCTYPE html> <html> <body> -<a href="sensors">sensors top</a> +<a href="%vsensors">sensors top</a> <br/> -<a href="tags">tags top</a> +<a href="%vtags">tags top</a> <br/> -<a href="status">status</a> +<a href="%vstatus">status</a> </body> </html> )EOF"; @@ -422,7 +422,10 @@ void TSolomonExporter::HandleIndex(const TString& prefix, const IRequestPtr& req rsp->SetStatus(EStatusCode::OK); rsp->GetHeaders()->Add("Content-Type", "text/html; charset=UTF-8"); - WaitFor(rsp->WriteBody(TSharedRef::FromString(IndexPage))) + auto prefixWithSlash = !prefix.empty() ? prefix + "/" : prefix; + auto indexPageFormatted = Format(IndexPage, prefixWithSlash, prefixWithSlash, prefixWithSlash); + + WaitFor(rsp->WriteBody(TSharedRef::FromString(indexPageFormatted))) .ThrowOnError(); } diff --git a/yt/yt_proto/yt/client/cache/proto/config.proto b/yt/yt_proto/yt/client/cache/proto/config.proto index acaea3bd6c..cbaf804ce8 100644 --- a/yt/yt_proto/yt/client/cache/proto/config.proto +++ b/yt/yt_proto/yt/client/cache/proto/config.proto @@ -27,6 +27,7 @@ message TConfig optional uint32 DefaultPingPeriod = 10; optional uint32 ModifyRowsBatchCapacity = 11; + optional ECompressionCodec RequestCodec = 17 [default = None]; optional ECompressionCodec ResponseCodec = 12 [default = None]; optional bool EnableRetries = 13; |