aboutsummaryrefslogtreecommitdiffstats
path: root/yt/cpp/mapreduce/client/client.cpp
diff options
context:
space:
mode:
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_) {