aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkvk1920 <kvk1920@yandex-team.com>2024-12-05 18:33:35 +0300
committerkvk1920 <kvk1920@yandex-team.com>2024-12-05 18:55:37 +0300
commitd0f4ba355ade8ccf46abe831d5207192fb6531b6 (patch)
treea53e3cf79693b37c03ef0221e05bf2ff8361bfd1
parentac81b4ff5a8fd2fd4c1fafa78ac07defb71478dc (diff)
downloadydb-d0f4ba355ade8ccf46abe831d5207192fb6531b6.tar.gz
YT-23706: fix attribute setter
* Changelog entry Type: fix Component: master Fix master crash on setting YSON dictionary with duplicated keys into custom attribute. commit_hash:be69867815e09d8459e94b5ba17757966ae5b0d5
-rw-r--r--yt/yt/core/ytree/ypath_detail.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/yt/yt/core/ytree/ypath_detail.cpp b/yt/yt/core/ytree/ypath_detail.cpp
index bcc24ea64b..b1e6fcc3c5 100644
--- a/yt/yt/core/ytree/ypath_detail.cpp
+++ b/yt/yt/core/ytree/ypath_detail.cpp
@@ -1369,7 +1369,9 @@ private:
void OnForwardingFinished(TString itemKey)
{
- YT_VERIFY(Map_->AddChild(itemKey, TreeBuilder_->EndTree()));
+ if (!Map_->AddChild(itemKey, TreeBuilder_->EndTree())) {
+ THROW_ERROR_EXCEPTION("Duplicate key %Qv", itemKey);
+ }
}
void OnMyEndMap() override