summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsabdenovch <[email protected]>2026-05-18 12:45:35 +0300
committersabdenovch <[email protected]>2026-05-18 13:17:32 +0300
commit2d2b44e7bb98a0bdf31071e47669cb5da1c0a4cf (patch)
tree7b7d1a81486c2c4e3761a63aa4e76068f9048603
parent958001b4de0508c61606ed083bc97ef27300c7e1 (diff)
Cosmetics, take 2
commit_hash:3210c0fdd660724baf1a21334f02a76448392ba2
-rw-r--r--yt/yt/client/table_client/row_buffer-inl.h39
-rw-r--r--yt/yt/client/table_client/row_buffer.h25
-rw-r--r--yt/yt/core/concurrency/public.h2
3 files changed, 49 insertions, 17 deletions
diff --git a/yt/yt/client/table_client/row_buffer-inl.h b/yt/yt/client/table_client/row_buffer-inl.h
new file mode 100644
index 00000000000..601f3df6021
--- /dev/null
+++ b/yt/yt/client/table_client/row_buffer-inl.h
@@ -0,0 +1,39 @@
+#ifndef ROW_BUFFER_INL_H_
+#error "Direct inclusion of this file is not allowed, include row_buffer.h"
+// For the sake of sane code completion.
+#include "row_buffer.h"
+#endif
+#undef ROW_BUFFER_INL_H_
+
+namespace NYT::NTableClient {
+
+////////////////////////////////////////////////////////////////////////////////
+
+template <class TTag>
+TRowBuffer::TRowBuffer(
+ TTag /*tag*/,
+ size_t startChunkSize,
+ IMemoryUsageTrackerPtr tracker,
+ bool allowMemoryOvercommit)
+ : Pool_(
+ GetRefCountedTypeCookie<TTag>(),
+ GetTrackedMemoryChunkProvider(std::move(tracker), allowMemoryOvercommit),
+ startChunkSize)
+{
+ static_assert(IsEmptyClass<TTag>());
+}
+
+template <class TTag>
+TRowBuffer::TRowBuffer(
+ TTag /*tag*/,
+ IMemoryChunkProviderPtr chunkProvider)
+ : Pool_(
+ GetRefCountedTypeCookie<TTag>(),
+ std::move(chunkProvider))
+{
+ static_assert(IsEmptyClass<TTag>());
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+} // namespace NYT::NTableClient
diff --git a/yt/yt/client/table_client/row_buffer.h b/yt/yt/client/table_client/row_buffer.h
index 47ef3d12faf..422ea20c63b 100644
--- a/yt/yt/client/table_client/row_buffer.h
+++ b/yt/yt/client/table_client/row_buffer.h
@@ -26,17 +26,10 @@ class TRowBuffer
public:
template <class TTag = TDefaultRowBufferPoolTag>
explicit TRowBuffer(
- TTag /*tag*/ = TDefaultRowBufferPoolTag(),
+ TTag tag = TDefaultRowBufferPoolTag(),
size_t startChunkSize = TChunkedMemoryPool::DefaultStartChunkSize,
IMemoryUsageTrackerPtr tracker = nullptr,
- bool allowMemoryOvercommit = false)
- : Pool_(
- GetRefCountedTypeCookie<TTag>(),
- GetTrackedMemoryChunkProvider(std::move(tracker), allowMemoryOvercommit),
- startChunkSize)
- {
- static_assert(IsEmptyClass<TTag>());
- }
+ bool allowMemoryOvercommit = false);
TRowBuffer(
TRefCountedTypeCookie tagCookie,
@@ -45,14 +38,8 @@ public:
template <class TTag>
TRowBuffer(
- TTag /*tag*/,
- IMemoryChunkProviderPtr chunkProvider)
- : Pool_(
- GetRefCountedTypeCookie<TTag>(),
- std::move(chunkProvider))
- {
- static_assert(IsEmptyClass<TTag>());
- }
+ TTag tag,
+ IMemoryChunkProviderPtr chunkProvider);
TChunkedMemoryPool* GetPool();
@@ -119,3 +106,7 @@ DEFINE_REFCOUNTED_TYPE(TRowBuffer)
////////////////////////////////////////////////////////////////////////////////
} // namespace NYT::NTableClient
+
+#define ROW_BUFFER_INL_H_
+#include "row_buffer-inl.h"
+#undef ROW_BUFFER_INL_H_
diff --git a/yt/yt/core/concurrency/public.h b/yt/yt/core/concurrency/public.h
index ece3aa9318e..981c04ea821 100644
--- a/yt/yt/core/concurrency/public.h
+++ b/yt/yt/core/concurrency/public.h
@@ -129,6 +129,8 @@ class TPropagatingStorage;
YT_DECLARE_RECONFIGURABLE_SINGLETON(TFiberManagerConfig, TFiberManagerDynamicConfig);
+// UDFs importing core yt headers cannot compile if a dynamically initialized and
+// destroyed global object, such as inline const std::string, is present.
extern const TFairShareThreadPoolTag DefaultExecutionTag;
////////////////////////////////////////////////////////////////////////////////