From 4e222e2aff9b602868a2f56feb9400293afd634c Mon Sep 17 00:00:00 2001 From: ermolovd Date: Thu, 12 Mar 2026 22:24:10 +0300 Subject: fetch dynamic config through cache, don't scare the users with expected errors commit_hash:03d0aeb6901ca96aae2f8570482204f0ca707c88 --- yt/cpp/mapreduce/client/client.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'yt/cpp/mapreduce/client/client.cpp') diff --git a/yt/cpp/mapreduce/client/client.cpp b/yt/cpp/mapreduce/client/client.cpp index fff13000fc0..f5ae5506427 100644 --- a/yt/cpp/mapreduce/client/client.cpp +++ b/yt/cpp/mapreduce/client/client.cpp @@ -90,6 +90,11 @@ bool IsNoSuchTransactionError(const TErrorResponse& e) return e.GetError().ContainsErrorCode(NClusterErrorCodes::NTransactionClient::NoSuchTransaction); } +bool IsResolveError(const TErrorResponse& e) +{ + return e.GetError().ContainsErrorCode(NClusterErrorCodes::NYTree::ResolveError); +} + //////////////////////////////////////////////////////////////////////////////// } // namespace @@ -1733,7 +1738,8 @@ const TNode::TMapType& TClient::GetDynamicConfiguration(const TString& configPro configProfile); try { - clusterConfigNode = Get(clusterConfigPath, TGetOptions()); + TExpectedErrorGuard guard(IsResolveError); + clusterConfigNode = Get(clusterConfigPath, TGetOptions().ReadFrom(EMasterReadKind::Cache)); } catch (const TErrorResponse& error) { if (!error.IsResolveError()) { throw; -- cgit v1.3