diff options
author | coteeq <coteeq@yandex-team.com> | 2025-03-23 20:48:26 +0300 |
---|---|---|
committer | coteeq <coteeq@yandex-team.com> | 2025-03-23 21:00:49 +0300 |
commit | 3cbb541dc69a0bd151ae01d28988102b19f201db (patch) | |
tree | 6d74c5524374d9ac124b713a6733460334adbacb | |
parent | 5c3efe144943640e2c8eb427a41fd4a569a52e4a (diff) | |
download | ydb-3cbb541dc69a0bd151ae01d28988102b19f201db.tar.gz |
YQL-19214: Check existence only on local cluster
commit_hash:7a826081edd81909397bf261cd1c82d7934479a0
-rw-r--r-- | yt/cpp/mapreduce/client/operation.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/yt/cpp/mapreduce/client/operation.cpp b/yt/cpp/mapreduce/client/operation.cpp index 652c01e4be..4eac765500 100644 --- a/yt/cpp/mapreduce/client/operation.cpp +++ b/yt/cpp/mapreduce/client/operation.cpp @@ -1062,17 +1062,19 @@ void CheckInputTablesExist( { Y_ENSURE(!paths.empty(), "Input tables are not set"); for (auto& path : paths) { - auto curTransactionId = path.TransactionId_.GetOrElse(preparer.GetTransactionId()); - auto exists = RequestWithRetry<bool>( - preparer.GetClientRetryPolicy()->CreatePolicyForGenericRequest(), - [&preparer, &curTransactionId, &path] (TMutationId /*mutationId*/) { - return preparer.GetClient()->GetRawClient()->Exists( - curTransactionId, - path.Path_); - }); - Y_ENSURE_EX( - path.Cluster_.Defined() || exists, - TApiUsageError() << "Input table '" << path.Path_ << "' doesn't exist"); + if (!path.Cluster_.Defined()) { + auto curTransactionId = path.TransactionId_.GetOrElse(preparer.GetTransactionId()); + auto exists = RequestWithRetry<bool>( + preparer.GetClientRetryPolicy()->CreatePolicyForGenericRequest(), + [&preparer, &curTransactionId, &path] (TMutationId /*mutationId*/) { + return preparer.GetClient()->GetRawClient()->Exists( + curTransactionId, + path.Path_); + }); + Y_ENSURE_EX( + exists, + TApiUsageError() << "Input table '" << path.Path_ << "' doesn't exist"); + } } } |