diff options
| author | hiddenpath <[email protected]> | 2025-03-01 17:24:09 +0300 |
|---|---|---|
| committer | hiddenpath <[email protected]> | 2025-03-01 17:42:01 +0300 |
| commit | 513eec13663e999f0e8537c42e804e5e8684f19a (patch) | |
| tree | 38a93cbb29a62558436ff498bcdfdee39b28afae /yt/cpp/mapreduce/client/operation.cpp | |
| parent | 8b739d2ab4331d499f54de87def577f77db0680a (diff) | |
YT-24173: Fix error resolving path in remote clusters operations
commit_hash:9facb0640518c75b7a745dad2ddbd649cb91a83f
Diffstat (limited to 'yt/cpp/mapreduce/client/operation.cpp')
| -rw-r--r-- | yt/cpp/mapreduce/client/operation.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/yt/cpp/mapreduce/client/operation.cpp b/yt/cpp/mapreduce/client/operation.cpp index 76a55b436fc..4d0cc07bed0 100644 --- a/yt/cpp/mapreduce/client/operation.cpp +++ b/yt/cpp/mapreduce/client/operation.cpp @@ -220,11 +220,24 @@ TStructuredJobTableList ApplyProtobufColumnFilters( return tableList; } - auto isDynamic = NRawClient::BatchTransform( + TVector<TRichYPath> tableListPaths; + for (const auto& table: tableList) { + Y_ABORT_UNLESS(table.RichYPath, "Cannot get path to apply column filters"); + tableListPaths.emplace_back(*table.RichYPath); + } + + auto isDynamic = NRawClient::RemoteClustersBatchTransform( preparer.GetClient()->GetRawClient(), - tableList, + preparer.GetContext(), + tableListPaths, [&] (IRawBatchRequestPtr batch, const auto& table) { - return batch->Get(preparer.GetTransactionId(), table.RichYPath->Path_ + "/@dynamic", TGetOptions()); + // In case of external cluster, we can't use the current transaction + // since it is unknown for the external cluster. + // Hence, we should take a global transaction. + if (table.Cluster_ && !table.Cluster_->empty()) { + return batch->Get(TTransactionId(), table.Path_ + "/@dynamic", TGetOptions()); + } + return batch->Get(preparer.GetTransactionId(), table.Path_ + "/@dynamic", TGetOptions()); }); auto newTableList = tableList; |
