aboutsummaryrefslogtreecommitdiffstats
path: root/yt/cpp/mapreduce/client/client.cpp
diff options
context:
space:
mode:
authorermolovd <ermolovd@yandex-team.com>2025-02-19 12:57:38 +0300
committerermolovd <ermolovd@yandex-team.com>2025-02-19 13:19:53 +0300
commitdbc58e8a3b624feb7bccd730530e520da549e859 (patch)
treebece6558f94e28a8d95cce5b413c2e39c37a28d0 /yt/cpp/mapreduce/client/client.cpp
parent209a37d035f1d8ea98e913ccbc07762ec479eab2 (diff)
downloadydb-dbc58e8a3b624feb7bccd730530e520da549e859.tar.gz
YT-21081: fix temp tables for case when client is created with GlobalTx
commit_hash:c49256f38de62e8d05359c16a70ea6b88220a9ba
Diffstat (limited to 'yt/cpp/mapreduce/client/client.cpp')
-rw-r--r--yt/cpp/mapreduce/client/client.cpp24
1 files changed, 19 insertions, 5 deletions
diff --git a/yt/cpp/mapreduce/client/client.cpp b/yt/cpp/mapreduce/client/client.cpp
index 004bfaf2d8..6e58903308 100644
--- a/yt/cpp/mapreduce/client/client.cpp
+++ b/yt/cpp/mapreduce/client/client.cpp
@@ -936,11 +936,6 @@ TBatchRequestPtr TClientBase::CreateBatchRequest()
return MakeIntrusive<TBatchRequest>(TransactionId_, GetParentClientImpl());
}
-IClientPtr TClientBase::GetParentClient()
-{
- return GetParentClientImpl();
-}
-
IRawClientPtr TClientBase::GetRawClient() const
{
return RawClient_;
@@ -1056,6 +1051,11 @@ ITransactionPingerPtr TTransaction::GetTransactionPinger()
return TransactionPinger_;
}
+IClientPtr TTransaction::GetParentClient(bool ignoreGlobalTx)
+{
+ return GetParentClientImpl()->GetParentClient(ignoreGlobalTx);
+}
+
TClientPtr TTransaction::GetParentClientImpl()
{
return ParentClient_;
@@ -1489,6 +1489,20 @@ TClientPtr TClient::GetParentClientImpl()
return this;
}
+IClientPtr TClient::GetParentClient(bool ignoreGlobalTx)
+{
+ if (!TransactionId_.IsEmpty() && ignoreGlobalTx) {
+ return MakeIntrusive<TClient>(
+ RawClient_,
+ Context_,
+ TTransactionId(),
+ ClientRetryPolicy_
+ );
+ } else {
+ return this;
+ }
+}
+
void TClient::CheckShutdown() const
{
if (Shutdown_) {