Skip to content

Commit 26b808f

Browse files
authored
Don't use Now() during replay for yt settings (#10732)
1 parent 7d2c257 commit 26b808f

15 files changed

+57
-50
lines changed

ydb/library/yql/core/extract_predicate/ut/extract_predicate_ut.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,8 @@ Y_UNIT_TEST_SUITE(TYqlExtractPredicate) {
4444
auto ytGateway = CreateYtFileGateway(yqlNativeServices);
4545
typesCtx = MakeIntrusive<TTypeAnnotationContext>();
4646
typesCtx->RandomProvider = CreateDeterministicRandomProvider(1);
47-
auto ytState = MakeIntrusive<TYtState>();
47+
auto ytState = MakeIntrusive<TYtState>(typesCtx.Get());
4848
ytState->Gateway = ytGateway;
49-
ytState->Types = typesCtx.Get();
5049

5150
InitializeYtGateway(ytGateway, ytState);
5251
typesCtx->AddDataSink(YtProviderName, CreateYtDataSink(ytState));

ydb/library/yql/core/facade/yql_facade.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,11 @@ TProgram::TProgram(
312312
QContext_.GetWriter()->Put({FacadeComponent, StaticCredentialsLabel}, credList).GetValueSync();
313313
} else if (QContext_.CanRead()) {
314314
Credentials_ = MakeIntrusive<TCredentials>();
315+
Credentials_->SetUserCredentials({
316+
.OauthToken = "REPLAY_OAUTH",
317+
.BlackboxSessionIdCookie = "REPLAY_SESSIONID"
318+
});
319+
315320
for (const auto& label : {StaticCredentialsLabel, DynamicCredentialsLabel}) {
316321
auto item = QContext_.GetReader()->Get({FacadeComponent, label}).GetValueSync();
317322
if (item) {

ydb/library/yql/core/ut/yql_expr_constraint_ut.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@ Y_UNIT_TEST_SUITE(TYqlExprConstraints) {
3131
auto ytGateway = CreateYtFileGateway(yqlNativeServices);
3232
auto typeAnnotationContext = MakeIntrusive<TTypeAnnotationContext>();
3333
typeAnnotationContext->RandomProvider = CreateDeterministicRandomProvider(1);
34-
auto ytState = MakeIntrusive<TYtState>();
34+
auto ytState = MakeIntrusive<TYtState>(typeAnnotationContext.Get());
3535
ytState->Gateway = ytGateway;
36-
ytState->Types = typeAnnotationContext.Get();
3736

3837
InitializeYtGateway(ytGateway, ytState);
3938
typeAnnotationContext->AddDataSink(YtProviderName, CreateYtDataSink(ytState));

ydb/library/yql/core/ut/yql_expr_discover_ut.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@ Y_UNIT_TEST_SUITE(TDiscoverYqlExpr) {
3131
auto ytGateway = CreateYtFileGateway(yqlNativeServices);
3232
auto typeAnnotationContext = MakeIntrusive<TTypeAnnotationContext>();
3333
typeAnnotationContext->DiscoveryMode = true;
34-
auto ytState = MakeIntrusive<TYtState>();
34+
auto ytState = MakeIntrusive<TYtState>(typeAnnotationContext.Get());
3535
ytState->Gateway = ytGateway;
36-
ytState->Types = typeAnnotationContext.Get();
3736

3837
InitializeYtGateway(ytGateway, ytState);
3938
auto randomProvider = CreateDeterministicRandomProvider(1);

ydb/library/yql/core/ut/yql_expr_optimize_ut.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,9 +592,8 @@ Y_UNIT_TEST_SUITE(TOptimizeYqlExpr) {
592592
auto yqlNativeServices = NFile::TYtFileServices::Make(functionRegistry.Get(), testTables);
593593
auto ytGateway = CreateYtFileGateway(yqlNativeServices);
594594
auto typeAnnotationContext = MakeIntrusive<TTypeAnnotationContext>();
595-
auto ytState = MakeIntrusive<TYtState>();
595+
auto ytState = MakeIntrusive<TYtState>(typeAnnotationContext.Get());
596596
ytState->Gateway = ytGateway;
597-
ytState->Types = typeAnnotationContext.Get();
598597

599598
InitializeYtGateway(ytGateway, ytState);
600599
auto randomProvider = CreateDeterministicRandomProvider(1);

ydb/library/yql/core/ut/yql_expr_providers_ut.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,8 @@ Y_UNIT_TEST_SUITE(TCompileWithProvidersYqlExpr) {
5959
auto yqlNativeServices = NFile::TYtFileServices::Make(functionRegistry.Get(), testTables);
6060
auto ytGateway = CreateYtFileGateway(yqlNativeServices);
6161
auto typeAnnotationContext = MakeIntrusive<TTypeAnnotationContext>();
62-
auto ytState = MakeIntrusive<TYtState>();
62+
auto ytState = MakeIntrusive<TYtState>(typeAnnotationContext.Get());
6363
ytState->Gateway = ytGateway;
64-
ytState->Types = typeAnnotationContext.Get();
6564

6665
InitializeYtGateway(ytGateway, ytState);
6766
typeAnnotationContext->AddDataSink(YtProviderName, CreateYtDataSink(ytState));

ydb/library/yql/providers/common/provider/yql_provider.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,12 +1155,15 @@ std::pair<IGraphTransformer::TStatus, TAsyncTransformCallbackFuture> FreezeUsedF
11551155
return SyncError();
11561156
}
11571157

1158+
if (types.QContext.CanRead()) {
1159+
return SyncOk();
1160+
}
1161+
11581162
auto future = FreezeUserDataTableIfNeeded(types.UserDataStorage, files, urlDownloadFilter);
11591163
if (future.Wait(TDuration::Zero())) {
11601164
files = future.GetValue()();
11611165
return SyncOk();
1162-
}
1163-
else {
1166+
} else {
11641167
return std::make_pair(IGraphTransformer::TStatus::Async, future.Apply(
11651168
[](const NThreading::TFuture<std::function<TUserDataTable()>>& completedFuture) {
11661169
return TAsyncTransformCallback([completedFuture](const TExprNode::TPtr& input, TExprNode::TPtr& output, TExprContext& ctx) {

ydb/library/yql/providers/yt/common/yql_yt_settings.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void MediaValidator(const NYT::TNode& value) {
5454
}
5555
}
5656

57-
TYtConfiguration::TYtConfiguration()
57+
TYtConfiguration::TYtConfiguration(TTypeAnnotationContext& typeCtx)
5858
{
5959
const auto codecValidator = [] (const TString&, TString str) {
6060
if (!ValidateCompressionCodecValue(str)) {
@@ -188,7 +188,7 @@ TYtConfiguration::TYtConfiguration()
188188
}
189189
});
190190
REGISTER_SETTING(*this, ExpirationDeadline)
191-
.Lower(Now())
191+
.Lower(typeCtx.QContext.CanRead() ? TInstant::Zero() : Now())
192192
.ValueSetter([this] (const TString& cluster, TInstant value) {
193193
ExpirationDeadline[cluster] = value;
194194
});

ydb/library/yql/providers/yt/common/yql_yt_settings.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ inline TString GetTablesTmpFolder(const TYtSettings& settings) {
295295
struct TYtConfiguration : public TYtSettings, public NCommon::TSettingDispatcher {
296296
using TPtr = TIntrusivePtr<TYtConfiguration>;
297297

298-
TYtConfiguration();
298+
TYtConfiguration(TTypeAnnotationContext& typeCtx);
299299
TYtConfiguration(const TYtConfiguration&) = delete;
300300

301301
template <class TProtoConfig, typename TFilter>
@@ -336,7 +336,11 @@ class TYtVersionedConfiguration: public TYtConfiguration {
336336
TYtSettings::TConstPtr Snapshot;
337337
};
338338

339-
TYtVersionedConfiguration() = default;
339+
TYtVersionedConfiguration(TTypeAnnotationContext& types)
340+
: TYtConfiguration(types)
341+
{
342+
}
343+
340344
~TYtVersionedConfiguration() = default;
341345

342346
size_t FindNodeVer(const TExprNode& node);

ydb/library/yql/providers/yt/gateway/native/ut/yql_yt_native_folders_ut.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,14 @@ class TYtReplier : public TRequestReplier {
185185

186186
Y_UNIT_TEST_SUITE(YtNativeGateway) {
187187

188-
std::pair<TIntrusivePtr<TYtState>, IYtGateway::TPtr> InitTest(const NTesting::TPortHolder& port) {
188+
std::pair<TIntrusivePtr<TYtState>, IYtGateway::TPtr> InitTest(const NTesting::TPortHolder& port, TTypeAnnotationContext* types) {
189189
TYtNativeServices nativeServices;
190190
auto gatewaysConfig = MakeGatewaysConfig(port);
191191
nativeServices.Config = std::make_shared<TYtGatewayConfig>(gatewaysConfig.GetYt());
192192
nativeServices.FileStorage = CreateFileStorage(TFileStorageConfig{});
193193

194194
auto ytGateway = CreateYtNativeGateway(nativeServices);
195-
auto ytState = MakeIntrusive<TYtState>();
195+
auto ytState = MakeIntrusive<TYtState>(types);
196196
ytState->Gateway = ytGateway;
197197

198198
InitializeYtGateway(ytGateway, ytState);
@@ -206,7 +206,8 @@ TMaybe<std::function<void(const NYT::TNode& request)>> gatewayRequestAssertion,
206206
[gatewayRequestAssertion, handleList, handleGet] () {return new TYtReplier(handleList, handleGet, gatewayRequestAssertion);}
207207
};
208208

209-
auto [ytState, ytGateway] = InitTest(port);
209+
TTypeAnnotationContext types;
210+
auto [ytState, ytGateway] = InitTest(port, &types);
210211

211212
IYtGateway::TFolderOptions folderOptions = makeFolderOptions(ytState->SessionId);
212213
auto folderFuture = ytGateway->GetFolder(std::move(folderOptions));

ydb/library/yql/providers/yt/provider/ut/yql_yt_cbo_ut.cpp

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,10 @@ Y_UNIT_TEST_SUITE(TYqlCBO) {
6161

6262
Y_UNIT_TEST(OrderJoinsDoesNothingWhenCBODisabled) {
6363
const TString cluster("ut_cluster");
64-
TYtState::TPtr state = MakeIntrusive<TYtState>();
64+
TTypeAnnotationContext typeCtx;
65+
TYtState::TPtr state = MakeIntrusive<TYtState>(&typeCtx);
6566
TYtJoinNodeOp::TPtr tree = nullptr;
6667
TYtJoinNodeOp::TPtr optimizedTree;
67-
TTypeAnnotationContext typeCtx;
68-
state->Types = &typeCtx;
6968

7069
TExprContext ctx;
7170

@@ -100,7 +99,8 @@ Y_UNIT_TEST(NonReordable) {
10099

101100
Y_UNIT_TEST(BuildOptimizerTree2Tables) {
102101
const TString cluster("ut_cluster");
103-
TYtState::TPtr state = MakeIntrusive<TYtState>();
102+
TTypeAnnotationContext typeCtx;
103+
TYtState::TPtr state = MakeIntrusive<TYtState>(&typeCtx);
104104
TExprContext exprCtx;
105105
auto tree = MakeOp({"c", "c_nationkey"}, {"n", "n_nationkey"}, {"c", "n"}, exprCtx);
106106
tree->Left = MakeLeaf({"c"}, {"c"}, 100000, 12333, exprCtx);
@@ -127,7 +127,8 @@ Y_UNIT_TEST(BuildOptimizerTree2Tables) {
127127

128128
Y_UNIT_TEST(BuildOptimizerTree2TablesComplexLabel) {
129129
const TString cluster("ut_cluster");
130-
TYtState::TPtr state = MakeIntrusive<TYtState>();
130+
TTypeAnnotationContext typeCtx;
131+
TYtState::TPtr state = MakeIntrusive<TYtState>(&typeCtx);
131132
TExprContext exprCtx;
132133
auto tree = MakeOp({"c", "c_nationkey"}, {"n", "n_nationkey"}, {"c", "n", "e"}, exprCtx);
133134
tree->Left = MakeLeaf({"c"}, {"c"}, 1000000, 1233333, exprCtx);
@@ -154,7 +155,8 @@ Y_UNIT_TEST(BuildOptimizerTree2TablesComplexLabel) {
154155

155156
Y_UNIT_TEST(BuildYtJoinTree2Tables) {
156157
const TString cluster("ut_cluster");
157-
TYtState::TPtr state = MakeIntrusive<TYtState>();
158+
TTypeAnnotationContext typeCtx;
159+
TYtState::TPtr state = MakeIntrusive<TYtState>(&typeCtx);
158160
TExprContext exprCtx;
159161
auto tree = MakeOp({"c", "c_nationkey"}, {"n", "n_nationkey"}, {"c", "n"}, exprCtx);
160162
tree->Left = MakeLeaf({"c"}, {"c"}, 100000, 12333, exprCtx);
@@ -172,7 +174,8 @@ Y_UNIT_TEST(BuildYtJoinTree2Tables) {
172174

173175
Y_UNIT_TEST(BuildYtJoinTree2TablesForceMergeJoib) {
174176
const TString cluster("ut_cluster");
175-
TYtState::TPtr state = MakeIntrusive<TYtState>();
177+
TTypeAnnotationContext typeCtx;
178+
TYtState::TPtr state = MakeIntrusive<TYtState>(&typeCtx);
176179
TExprContext exprCtx;
177180
auto tree = MakeOp({"c", "c_nationkey"}, {"n", "n_nationkey"}, {"c", "n"}, exprCtx);
178181
tree->Left = MakeLeaf({"c"}, {"c"}, 100000, 12333, exprCtx);
@@ -191,7 +194,8 @@ Y_UNIT_TEST(BuildYtJoinTree2TablesForceMergeJoib) {
191194

192195
Y_UNIT_TEST(BuildYtJoinTree2TablesComplexLabel) {
193196
const TString cluster("ut_cluster");
194-
TYtState::TPtr state = MakeIntrusive<TYtState>();
197+
TTypeAnnotationContext typeCtx;
198+
TYtState::TPtr state = MakeIntrusive<TYtState>(&typeCtx);
195199
TExprContext exprCtx;
196200
auto tree = MakeOp({"c", "c_nationkey"}, {"n", "n_nationkey"}, {"c", "n", "e"}, exprCtx);
197201
tree->Left = MakeLeaf({"c"}, {"c"}, 1000000, 1233333, exprCtx);
@@ -209,7 +213,8 @@ Y_UNIT_TEST(BuildYtJoinTree2TablesComplexLabel) {
209213
Y_UNIT_TEST(BuildYtJoinTree2TablesTableIn2Rels)
210214
{
211215
const TString cluster("ut_cluster");
212-
TYtState::TPtr state = MakeIntrusive<TYtState>();
216+
TTypeAnnotationContext typeCtx;
217+
TYtState::TPtr state = MakeIntrusive<TYtState>(&typeCtx);
213218
TExprContext exprCtx;
214219
auto tree = MakeOp({"c", "c_nationkey"}, {"n", "n_nationkey"}, {"c", "n", "c"}, exprCtx);
215220
tree->Left = MakeLeaf({"c"}, {"c"}, 1000000, 1233333, exprCtx);
@@ -239,10 +244,9 @@ void OrderJoins2Tables(auto optimizerType) {
239244
tree->Left = MakeLeaf({"c"}, {"c"}, 100000, 12333, exprCtx);
240245
tree->Right = MakeLeaf({"n"}, {"n"}, 1000, 1233, exprCtx);
241246

242-
TYtState::TPtr state = MakeIntrusive<TYtState>();
243247
TTypeAnnotationContext typeCtx;
244248
typeCtx.CostBasedOptimizer = optimizerType;
245-
state->Types = &typeCtx;
249+
TYtState::TPtr state = MakeIntrusive<TYtState>(&typeCtx);
246250
auto optimizedTree = OrderJoins(tree, state, cluster, exprCtx, true);
247251
UNIT_ASSERT(optimizedTree != tree);
248252
UNIT_ASSERT(optimizedTree->Left);
@@ -269,9 +273,8 @@ void OrderJoins2TablesComplexLabel(auto optimizerType)
269273
tree->Right = MakeLeaf({"n"}, {"n", "e"}, 10000, 12333, exprCtx);
270274

271275
TTypeAnnotationContext typeCtx;
272-
TYtState::TPtr state = MakeIntrusive<TYtState>();
273276
typeCtx.CostBasedOptimizer = optimizerType;
274-
state->Types = &typeCtx;
277+
TYtState::TPtr state = MakeIntrusive<TYtState>(&typeCtx);
275278
auto optimizedTree = OrderJoins(tree, state, cluster, exprCtx, true);
276279
UNIT_ASSERT(optimizedTree != tree);
277280
}
@@ -287,9 +290,8 @@ void OrderJoins2TablesTableIn2Rels(auto optimizerType)
287290
tree->Right = MakeLeaf({"n"}, {"n", "c"}, 10000, 12333, exprCtx);
288291

289292
TTypeAnnotationContext typeCtx;
290-
TYtState::TPtr state = MakeIntrusive<TYtState>();
291293
typeCtx.CostBasedOptimizer = optimizerType;
292-
state->Types = &typeCtx;
294+
TYtState::TPtr state = MakeIntrusive<TYtState>(&typeCtx);
293295
auto optimizedTree = OrderJoins(tree, state, cluster, exprCtx, true);
294296
UNIT_ASSERT(optimizedTree != tree);
295297
}
@@ -306,9 +308,8 @@ Y_UNIT_TEST(OrderLeftJoin)
306308
tree->JoinKind = exprCtx.NewAtom(exprCtx.AppendPosition({}), "Left");
307309

308310
TTypeAnnotationContext typeCtx;
309-
TYtState::TPtr state = MakeIntrusive<TYtState>();
310311
typeCtx.CostBasedOptimizer = ECostBasedOptimizerType::PG;
311-
state->Types = &typeCtx;
312+
TYtState::TPtr state = MakeIntrusive<TYtState>(&typeCtx);
312313
auto optimizedTree = OrderJoins(tree, state, cluster, exprCtx, true);
313314
UNIT_ASSERT(optimizedTree != tree);
314315
UNIT_ASSERT_STRINGS_EQUAL("Left", optimizedTree->JoinKind->Content());
@@ -324,9 +325,8 @@ Y_UNIT_TEST(UnsupportedJoin)
324325
tree->JoinKind = exprCtx.NewAtom(exprCtx.AppendPosition({}), "RightSemi");
325326

326327
TTypeAnnotationContext typeCtx;
327-
TYtState::TPtr state = MakeIntrusive<TYtState>();
328328
typeCtx.CostBasedOptimizer = ECostBasedOptimizerType::PG;
329-
state->Types = &typeCtx;
329+
TYtState::TPtr state = MakeIntrusive<TYtState>(&typeCtx);
330330
auto optimizedTree = OrderJoins(tree, state, cluster, exprCtx, true);
331331
UNIT_ASSERT(optimizedTree == tree);
332332
}
@@ -340,9 +340,8 @@ Y_UNIT_TEST(OrderJoinSinglePass) {
340340
tree->JoinKind = exprCtx.NewAtom(exprCtx.AppendPosition({}), "Left");
341341

342342
TTypeAnnotationContext typeCtx;
343-
TYtState::TPtr state = MakeIntrusive<TYtState>();
344343
typeCtx.CostBasedOptimizer = ECostBasedOptimizerType::PG;
345-
state->Types = &typeCtx;
344+
TYtState::TPtr state = MakeIntrusive<TYtState>(&typeCtx);
346345
auto optimizedTree = OrderJoins(tree, state, cluster, exprCtx, true);
347346
UNIT_ASSERT(optimizedTree != tree);
348347
UNIT_ASSERT(optimizedTree->CostBasedOptPassed);
@@ -358,9 +357,8 @@ Y_UNIT_TEST(OrderJoinsDoesNothingWhenCBOAlreadyPassed) {
358357
tree->CostBasedOptPassed = true;
359358

360359
TTypeAnnotationContext typeCtx;
361-
TYtState::TPtr state = MakeIntrusive<TYtState>();
362360
typeCtx.CostBasedOptimizer = ECostBasedOptimizerType::PG;
363-
state->Types = &typeCtx;
361+
TYtState::TPtr state = MakeIntrusive<TYtState>(&typeCtx);
364362
auto optimizedTree = OrderJoins(tree, state, cluster, exprCtx, true);
365363
UNIT_ASSERT(optimizedTree == tree);
366364
}

ydb/library/yql/providers/yt/provider/ut/yql_yt_dq_integration_ut.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@ namespace {
1010
struct TTestSetup {
1111
TTestSetup()
1212
: TypesCtx(MakeHolder<TTypeAnnotationContext>())
13-
, State(MakeIntrusive<TYtState>())
13+
, State(MakeIntrusive<TYtState>(TypesCtx.Get()))
1414
{
15-
State->Types = TypesCtx.Get();
1615
State->DqIntegration_ = CreateYtDqIntegration(State.Get());
17-
1816
}
1917

2018
THolder<TTypeAnnotationContext> TypesCtx;

ydb/library/yql/providers/yt/provider/ut/yql_yt_epoch_ut.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@ Y_UNIT_TEST_SUITE(TYqlEpoch) {
4343
auto ytGateway = CreateYtFileGateway(yqlNativeServices);
4444
auto typeAnnotationContext = MakeIntrusive<TTypeAnnotationContext>();
4545
typeAnnotationContext->RandomProvider = CreateDeterministicRandomProvider(1);
46-
auto ytState = MakeIntrusive<TYtState>();
46+
auto ytState = MakeIntrusive<TYtState>(typeAnnotationContext.Get());
4747
ytState->Gateway = ytGateway;
48-
ytState->Types = typeAnnotationContext.Get();
4948
ytState->Configuration->Dispatch(NCommon::ALL_CLUSTERS, "_EnableWriteReorder", "true", NCommon::TSettingDispatcher::EStage::CONFIG, NCommon::TSettingDispatcher::GetDefaultErrorCallback());
5049

5150
InitializeYtGateway(ytGateway, ytState);

ydb/library/yql/providers/yt/provider/yql_yt_provider.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,10 +337,9 @@ void TYtState::LeaveEvaluation(ui64 id) {
337337
}
338338

339339
std::pair<TIntrusivePtr<TYtState>, TStatWriter> CreateYtNativeState(IYtGateway::TPtr gateway, const TString& userName, const TString& sessionId, const TYtGatewayConfig* ytGatewayConfig, TIntrusivePtr<TTypeAnnotationContext> typeCtx) {
340-
auto ytState = MakeIntrusive<TYtState>();
340+
auto ytState = MakeIntrusive<TYtState>(typeCtx.Get());
341341
ytState->SessionId = sessionId;
342342
ytState->Gateway = gateway;
343-
ytState->Types = typeCtx.Get();
344343
ytState->DqIntegration_ = CreateYtDqIntegration(ytState.Get());
345344

346345
if (ytGatewayConfig) {

ydb/library/yql/providers/yt/provider/yql_yt_provider.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,18 @@ struct TYtState : public TThrRefBase {
8989
bool IsHybridEnabled() const;
9090
bool IsHybridEnabledForCluster(const std::string_view& cluster) const;
9191
bool HybridTakesTooLong() const;
92+
93+
TYtState(TTypeAnnotationContext* types) {
94+
Types = types;
95+
Configuration = MakeIntrusive<TYtVersionedConfiguration>(*types);
96+
}
9297

9398
TString SessionId;
9499
IYtGateway::TPtr Gateway;
95100
TTypeAnnotationContext* Types = nullptr;
96101
TMaybe<std::pair<ui32, size_t>> LoadEpochMetadata; // Epoch being committed, settings versions
97102
THashMap<ui32, TSet<std::pair<TString, TString>>> EpochDependencies; // List of tables, which have to be updated after committing specific epoch
98-
TYtVersionedConfiguration::TPtr Configuration = MakeIntrusive<TYtVersionedConfiguration>();
103+
TYtVersionedConfiguration::TPtr Configuration;
99104
TYtTablesData::TPtr TablesData = MakeIntrusive<TYtTablesData>();
100105
THashMap<std::pair<TString, TString>, TString> AnonymousLabels; // cluster + label -> name
101106
std::unordered_map<ui64, TString> NodeHash; // unique id -> hash

0 commit comments

Comments
 (0)