diff options
author | Maxim Yurchuk <maxim-yurchuk@ydb.tech> | 2024-12-12 15:00:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-12 15:00:43 +0000 |
commit | 42701242eaf5be980cb935631586d0e90b82641c (patch) | |
tree | 6dbf5fcd37d3c16591e196c4a69d166e3ab3a398 /library/cpp | |
parent | 7f5a9f394dbd9ac290cabbb7977538656b3a541e (diff) | |
parent | f7c04b5876af3d16849ab5e3079c0eabbd4e3a00 (diff) | |
download | ydb-42701242eaf5be980cb935631586d0e90b82641c.tar.gz |
Merge pull request #12554 from vitalyisaev2/YQ-3839.with_rightlib.3
Import from Arcadia + YDB FQ: turning gateways_config.proto into a file without external dependencies
Diffstat (limited to 'library/cpp')
-rw-r--r-- | library/cpp/cgiparam/cgiparam.cpp | 8 | ||||
-rw-r--r-- | library/cpp/cgiparam/cgiparam.h | 16 | ||||
-rw-r--r-- | library/cpp/tld/tlds-alpha-by-domain.txt | 2 | ||||
-rw-r--r-- | library/cpp/unified_agent_client/grpc_io.cpp | 2 |
4 files changed, 15 insertions, 13 deletions
diff --git a/library/cpp/cgiparam/cgiparam.cpp b/library/cpp/cgiparam/cgiparam.cpp index c2fb6e32aa..397e23407f 100644 --- a/library/cpp/cgiparam/cgiparam.cpp +++ b/library/cpp/cgiparam/cgiparam.cpp @@ -11,7 +11,7 @@ TCgiParameters::TCgiParameters(std::initializer_list<std::pair<TString, TString> } } -const TString& TCgiParameters::Get(const TStringBuf name, size_t numOfValue) const noexcept { +const TString& TCgiParameters::Get(const TStringBuf name, size_t numOfValue) const noexcept Y_LIFETIME_BOUND { const auto it = Find(name, numOfValue); return end() == it ? Default<TString>() : it->second; @@ -221,7 +221,7 @@ TString TCgiParameters::QuotedPrint(const char* safe) const { return res; } -TCgiParameters::const_iterator TCgiParameters::Find(const TStringBuf name, size_t pos) const noexcept { +TCgiParameters::const_iterator TCgiParameters::Find(const TStringBuf name, size_t pos) const noexcept Y_LIFETIME_BOUND { const auto pair = equal_range(name); for (auto it = pair.first; it != pair.second; ++it, --pos) { @@ -265,7 +265,7 @@ TQuickCgiParam::TQuickCgiParam(const TStringBuf cgiParamStr) { } } -const TStringBuf& TQuickCgiParam::Get(const TStringBuf name, size_t pos) const noexcept { +TStringBuf TQuickCgiParam::Get(const TStringBuf name, size_t pos) const noexcept Y_LIFETIME_BOUND { const auto pair = equal_range(name); for (auto it = pair.first; it != pair.second; ++it, --pos) { @@ -274,7 +274,7 @@ const TStringBuf& TQuickCgiParam::Get(const TStringBuf name, size_t pos) const n } } - return Default<TStringBuf>(); + return TStringBuf{}; } bool TQuickCgiParam::Has(const TStringBuf name, const TStringBuf value) const noexcept { diff --git a/library/cpp/cgiparam/cgiparam.h b/library/cpp/cgiparam/cgiparam.h index cbb212f6f0..465940be67 100644 --- a/library/cpp/cgiparam/cgiparam.h +++ b/library/cpp/cgiparam/cgiparam.h @@ -61,7 +61,7 @@ public: } Y_PURE_FUNCTION - const_iterator Find(const TStringBuf name, size_t numOfValue = 0) const noexcept; + const_iterator Find(const TStringBuf name, size_t numOfValue = 0) const noexcept Y_LIFETIME_BOUND; Y_PURE_FUNCTION bool Has(const TStringBuf name, const TStringBuf value) const noexcept; @@ -76,7 +76,7 @@ public: * @note The returned value is CGI-unescaped. */ Y_PURE_FUNCTION - const TString& Get(const TStringBuf name, size_t numOfValue = 0) const noexcept; + const TString& Get(const TStringBuf name, size_t numOfValue = 0) const noexcept Y_LIFETIME_BOUND; void InsertEscaped(const TStringBuf name, const TStringBuf value); @@ -116,24 +116,24 @@ public: bool Erase(const TStringBuf name, const TStringBuf val); bool ErasePattern(const TStringBuf name, const TStringBuf pat); - inline const char* FormField(const TStringBuf name, size_t numOfValue = 0) const { + inline const char* FormField(const TStringBuf name, size_t numOfValue = 0) const Y_LIFETIME_BOUND { const_iterator it = Find(name, numOfValue); if (it == end()) { return nullptr; } - return it->second.data(); + return it->second.c_str(); } - inline TStringBuf FormFieldBuf(const TStringBuf name, size_t numOfValue = 0) const { + inline TStringBuf FormFieldBuf(const TStringBuf name, size_t numOfValue = 0) const Y_LIFETIME_BOUND { const_iterator it = Find(name, numOfValue); if (it == end()) { - return nullptr; + return TStringBuf{}; } - return it->second.data(); + return it->second; } }; @@ -181,7 +181,7 @@ public: } Y_PURE_FUNCTION - const TStringBuf& Get(const TStringBuf name, size_t numOfValue = 0) const noexcept; + TStringBuf Get(const TStringBuf name, size_t numOfValue = 0) const noexcept Y_LIFETIME_BOUND; private: TString UnescapeBuf; diff --git a/library/cpp/tld/tlds-alpha-by-domain.txt b/library/cpp/tld/tlds-alpha-by-domain.txt index eda39f07a6..ce0708bbb8 100644 --- a/library/cpp/tld/tlds-alpha-by-domain.txt +++ b/library/cpp/tld/tlds-alpha-by-domain.txt @@ -1,4 +1,4 @@ -# Version 2024120700, Last Updated Sat Dec 7 07:07:01 2024 UTC +# Version 2024121000, Last Updated Tue Dec 10 07:07:01 2024 UTC AAA AARP ABB diff --git a/library/cpp/unified_agent_client/grpc_io.cpp b/library/cpp/unified_agent_client/grpc_io.cpp index 0eb17e5d30..1181d37c73 100644 --- a/library/cpp/unified_agent_client/grpc_io.cpp +++ b/library/cpp/unified_agent_client/grpc_io.cpp @@ -1,5 +1,6 @@ #include "grpc_io.h" +#include <contrib/libs/grpc/src/core/lib/event_engine/thread_pool.h> #include <contrib/libs/grpc/src/core/lib/iomgr/exec_ctx.h> #include <contrib/libs/grpc/src/core/lib/iomgr/executor.h> #include <contrib/libs/grpc/src/core/lib/surface/completion_queue.h> @@ -147,6 +148,7 @@ namespace NUnifiedAgent { limit = 2; } grpc_core::Executor::SetThreadsLimit(limit); + grpc_event_engine::experimental::ThreadPool::SetThreadsLimit(limit); }); } |