aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordcherednik <dcherednik@ydb.tech>2023-08-11 13:12:01 +0300
committerdcherednik <dcherednik@ydb.tech>2023-08-11 14:19:33 +0300
commitc96db35922d8b3e8b9b1346ba2d7aca8c4d822c4 (patch)
tree499ca4ba154347cdcb75626434da7fb56e89ce96
parenta908cb17247ecfeb4006579c2eb56e4ae026aeed (diff)
downloadydb-c96db35922d8b3e8b9b1346ba2d7aca8c4d822c4.tar.gz
Hack to prevent data race during concurrent IsPresortSupported call. KIKIMR-19015
-rw-r--r--ydb/core/kqp/query_data/kqp_prepared_query.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/ydb/core/kqp/query_data/kqp_prepared_query.cpp b/ydb/core/kqp/query_data/kqp_prepared_query.cpp
index f7b7f07fcb4..4a5a10acd66 100644
--- a/ydb/core/kqp/query_data/kqp_prepared_query.cpp
+++ b/ydb/core/kqp/query_data/kqp_prepared_query.cpp
@@ -75,6 +75,9 @@ TKqpPhyTxHolder::TKqpPhyTxHolder(const std::shared_ptr<const NKikimrKqp::TPrepar
auto& result = TxResultsMeta[i];
result.MkqlItemType = ImportTypeFromProto(txResult.GetItemType(), Alloc->TypeEnv);
+ //Hack to prevent data race. Side effect of IsPresortSupported - fill cached value.
+ //So no more concurent write subsequently
+ result.MkqlItemType->IsPresortSupported();
if (txResult.ColumnHintsSize() > 0) {
result.ColumnOrder.reserve(txResult.GetColumnHints().size());
auto* structType = static_cast<NKikimr::NMiniKQL::TStructType*>(result.MkqlItemType);