aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarkady-e1ppa <arkady-e1ppa@yandex-team.com>2024-09-18 20:26:10 +0300
committerarkady-e1ppa <arkady-e1ppa@yandex-team.com>2024-09-18 20:45:08 +0300
commitd52033f579a6fb762b53f11cfb88dbd23b50ce5c (patch)
treed53ababf0852d3267f37b0e1cdecd5698b7298e1
parent2383b0ff060fa1b27b24f414de3de1eb215c1171 (diff)
downloadydb-d52033f579a6fb762b53f11cfb88dbd23b50ce5c.tar.gz
Babenko-issues of rXXXXXX
commit_hash:5bcbd8471cc032076a958f28b0a58ba87b3bd681
-rw-r--r--yt/yt/core/concurrency/fiber_scheduler_thread.cpp4
-rw-r--r--yt/yt/core/misc/error.cpp24
-rw-r--r--yt/yt/core/misc/error.h6
-rw-r--r--yt/yt/core/net/local_address.cpp4
-rw-r--r--yt/yt/core/tracing/trace_context.cpp2
5 files changed, 20 insertions, 20 deletions
diff --git a/yt/yt/core/concurrency/fiber_scheduler_thread.cpp b/yt/yt/core/concurrency/fiber_scheduler_thread.cpp
index 1add139c3f..4c1509d8ca 100644
--- a/yt/yt/core/concurrency/fiber_scheduler_thread.cpp
+++ b/yt/yt/core/concurrency/fiber_scheduler_thread.cpp
@@ -1091,13 +1091,13 @@ YT_DEFINE_THREAD_LOCAL(TFiberId, CurrentFiberId);
TFiberId GetCurrentFiberId()
{
- NYT::NOrigin::EnableOriginOverrides();
+ NYT::NDetail::EnableErrorOriginOverrides();
return CurrentFiberId();
}
void SetCurrentFiberId(TFiberId id)
{
- NYT::NOrigin::EnableOriginOverrides();
+ NYT::NDetail::EnableErrorOriginOverrides();
CurrentFiberId() = id;
}
diff --git a/yt/yt/core/misc/error.cpp b/yt/yt/core/misc/error.cpp
index c707ddc2e0..cc5fcbf7a4 100644
--- a/yt/yt/core/misc/error.cpp
+++ b/yt/yt/core/misc/error.cpp
@@ -34,7 +34,7 @@ constexpr TStringBuf OriginalErrorDepthAttribute = "original_error_depth";
////////////////////////////////////////////////////////////////////////////////
-namespace NOrigin {
+namespace NDetail {
namespace {
@@ -72,8 +72,6 @@ void TryExtractHost(const TOriginAttributes& attributes)
attributes.Host = name;
}
-} // namespace
-
////////////////////////////////////////////////////////////////////////////////
bool HasHost(const TOriginAttributes& attributes) noexcept
@@ -187,9 +185,11 @@ TOriginAttributes ExtractFromDictionaryOverride(const NYTree::IAttributeDictiona
return result;
}
+} // namespace
+
////////////////////////////////////////////////////////////////////////////////
-void EnableOriginOverrides()
+void EnableErrorOriginOverrides()
{
static NGlobal::TVariable<std::byte> getExtensionDataOverride{
NYT::NDetail::GetExtensionDataTag,
@@ -214,14 +214,14 @@ void EnableOriginOverrides()
extractFromDictionaryOverride.Get();
}
-} // namespace NOrigin
+} // namespace NDetail
////////////////////////////////////////////////////////////////////////////////
bool HasHost(const TError& error) noexcept
{
if (auto* attributes = error.MutableOriginAttributes()) {
- return NOrigin::HasHost(*attributes);
+ return NYT::NDetail::HasHost(*attributes);
}
return false;
}
@@ -229,7 +229,7 @@ bool HasHost(const TError& error) noexcept
TStringBuf GetHost(const TError& error) noexcept
{
if (auto* attributes = error.MutableOriginAttributes()) {
- return NOrigin::GetHost(*attributes);
+ return NYT::NDetail::GetHost(*attributes);
}
return {};
}
@@ -237,7 +237,7 @@ TStringBuf GetHost(const TError& error) noexcept
NConcurrency::TFiberId GetFid(const TError& error) noexcept
{
if (auto* attributes = error.MutableOriginAttributes()) {
- return NOrigin::GetFid(*attributes);
+ return NYT::NDetail::GetFid(*attributes);
}
return NConcurrency::InvalidFiberId;
}
@@ -245,7 +245,7 @@ NConcurrency::TFiberId GetFid(const TError& error) noexcept
bool HasTracingAttributes(const TError& error) noexcept
{
if (auto* attributes = error.MutableOriginAttributes()) {
- return NOrigin::HasTracingAttributes(*attributes);
+ return NYT::NDetail::HasTracingAttributes(*attributes);
}
return false;
}
@@ -253,7 +253,7 @@ bool HasTracingAttributes(const TError& error) noexcept
NTracing::TTraceId GetTraceId(const TError& error) noexcept
{
if (auto* attributes = error.MutableOriginAttributes()) {
- return NOrigin::GetTraceId(*attributes);
+ return NYT::NDetail::GetTraceId(*attributes);
}
return NTracing::InvalidTraceId;
}
@@ -261,7 +261,7 @@ NTracing::TTraceId GetTraceId(const TError& error) noexcept
NTracing::TSpanId GetSpanId(const TError& error) noexcept
{
if (auto* attributes = error.MutableOriginAttributes()) {
- return NOrigin::GetSpanId(*attributes);
+ return NYT::NDetail::GetSpanId(*attributes);
}
return NTracing::InvalidSpanId;
}
@@ -274,7 +274,7 @@ void SetTracingAttributes(TError* error, const NTracing::TTracingAttributes& att
return;
}
- NOrigin::UpdateTracingAttributes(originAttributes, attributes);
+ NYT::NDetail::UpdateTracingAttributes(originAttributes, attributes);
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/misc/error.h b/yt/yt/core/misc/error.h
index 18c984803d..f3c773da33 100644
--- a/yt/yt/core/misc/error.h
+++ b/yt/yt/core/misc/error.h
@@ -17,11 +17,11 @@ namespace NYT {
////////////////////////////////////////////////////////////////////////////////
-namespace NOrigin {
+namespace NDetail {
-void EnableOriginOverrides();
+void EnableErrorOriginOverrides();
-} // namespace NOrigin
+} // namespace NDetail
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/net/local_address.cpp b/yt/yt/core/net/local_address.cpp
index 03aa4e6650..541b152cdb 100644
--- a/yt/yt/core/net/local_address.cpp
+++ b/yt/yt/core/net/local_address.cpp
@@ -50,7 +50,7 @@ std::atomic<bool> IPv6Enabled_ = false;
const char* ReadLocalHostName() noexcept
{
- NYT::NOrigin::EnableOriginOverrides();
+ NYT::NDetail::EnableErrorOriginOverrides();
// Writer-side imposes AcqRel ordering, so all preceding writes must be visible.
char* ptr = LocalHostNamePtr.load(std::memory_order::relaxed);
return ptr ? ptr : LocalHostNameData;
@@ -86,7 +86,7 @@ void GuardedWriteString(std::atomic<char*>& storage, char* initial, TStringBuf s
void WriteLocalHostName(TStringBuf hostName) noexcept
{
- NYT::NOrigin::EnableOriginOverrides();
+ NYT::NDetail::EnableErrorOriginOverrides();
static NThreading::TForkAwareSpinLock Lock;
auto guard = Guard(Lock);
diff --git a/yt/yt/core/tracing/trace_context.cpp b/yt/yt/core/tracing/trace_context.cpp
index 1e3006b60b..b65e537a92 100644
--- a/yt/yt/core/tracing/trace_context.cpp
+++ b/yt/yt/core/tracing/trace_context.cpp
@@ -115,7 +115,7 @@ namespace NDetail {
thread_local TTraceContext *CurrentTraceContextData{};
YT_PREVENT_TLS_CACHING TTraceContext*& CurrentTraceContext()
{
- NYT::NOrigin::EnableOriginOverrides();
+ NYT::NDetail::EnableErrorOriginOverrides();
asm volatile("");
return CurrentTraceContextData;
}