@@ -196,7 +196,6 @@ Y_UNIT_TEST_SUITE(IndexBuildTest) {
196
196
void BaseCase (NKikimrSchemeOp::EIndexType indexType) {
197
197
TTestBasicRuntime runtime;
198
198
TTestEnv env (runtime);
199
- runtime.GetAppData ().FeatureFlags .SetEnableAddUniqueIndex (true );
200
199
ui64 txId = 100 ;
201
200
202
201
runtime.SetLogPriority (NKikimrServices::TX_DATASHARD, NLog::PRI_TRACE);
@@ -404,7 +403,6 @@ Y_UNIT_TEST_SUITE(IndexBuildTest) {
404
403
void CancellationNotEnoughRetries (NKikimrSchemeOp::EIndexType indexType) {
405
404
TTestBasicRuntime runtime;
406
405
TTestEnv env (runtime);
407
- runtime.GetAppData ().FeatureFlags .SetEnableAddUniqueIndex (true );
408
406
ui64 txId = 100 ;
409
407
410
408
runtime.SetLogPriority (NKikimrServices::TX_DATASHARD, NLog::PRI_TRACE);
@@ -538,7 +536,6 @@ Y_UNIT_TEST_SUITE(IndexBuildTest) {
538
536
void CancellationNoTable (NKikimrSchemeOp::EIndexType indexType) {
539
537
TTestBasicRuntime runtime;
540
538
TTestEnv env (runtime);
541
- runtime.GetAppData ().FeatureFlags .SetEnableAddUniqueIndex (true );
542
539
ui64 txId = 100 ;
543
540
544
541
TestBuildIndex (runtime, ++txId, TTestTxConfig::SchemeShard, " /MyRoot" , " /MyRoot/Table" , TBuildIndexConfig{" index1" , indexType, {" index" }, {}}, Ydb::StatusIds::BAD_REQUEST);
@@ -559,7 +556,6 @@ Y_UNIT_TEST_SUITE(IndexBuildTest) {
559
556
void WithFollowers (NKikimrSchemeOp::EIndexType indexType) {
560
557
TTestBasicRuntime runtime;
561
558
TTestEnv env (runtime);
562
- runtime.GetAppData ().FeatureFlags .SetEnableAddUniqueIndex (true );
563
559
ui64 txId = 100 ;
564
560
565
561
TestCreateTable (runtime, ++txId, " /MyRoot" , R"(
@@ -623,7 +619,6 @@ Y_UNIT_TEST_SUITE(IndexBuildTest) {
623
619
void RejectsCreate (NKikimrSchemeOp::EIndexType indexType) {
624
620
TTestBasicRuntime runtime;
625
621
TTestEnv env (runtime, TTestEnvOptions ().EnableProtoSourceIdInfo (true ));
626
- runtime.GetAppData ().FeatureFlags .SetEnableAddUniqueIndex (true );
627
622
ui64 txId = 100 ;
628
623
629
624
TestBuildIndex (runtime, ++txId, TTestTxConfig::SchemeShard, " /MyRoot" , " /MyRoot/NotExist" , TBuildIndexConfig{" index1" , indexType, {" index" }, {}}, Ydb::StatusIds::BAD_REQUEST);
@@ -635,7 +630,7 @@ Y_UNIT_TEST_SUITE(IndexBuildTest) {
635
630
TestBuildIndex (runtime, ++txId, TTestTxConfig::SchemeShard, " /MyRoot" , " /MyRoot/DIR" , TBuildIndexConfig{" index1" , indexType, {" index" }, {}}, Ydb::StatusIds::BAD_REQUEST);
636
631
env.TestWaitNotification (runtime, txId);
637
632
638
- TestCreateIndexedTable (runtime, ++txId, " /MyRoot" , R"(
633
+ TestCreateIndexedTable (runtime, ++txId, " /MyRoot" , Sprintf ( R"(
639
634
TableDescription {
640
635
Name: "Table"
641
636
Columns { Name: "key" Type: "Uint64" }
@@ -646,13 +641,15 @@ Y_UNIT_TEST_SUITE(IndexBuildTest) {
646
641
}
647
642
IndexDescription {
648
643
Name: "UserDefinedIndexByValue0"
644
+ Type: %s
649
645
KeyColumnNames: ["value0"]
650
646
}
651
647
IndexDescription {
652
648
Name: "UserDefinedIndexByValue1"
649
+ Type: %s
653
650
KeyColumnNames: ["value1"]
654
651
}
655
- )" );
652
+ )" , NKikimrSchemeOp::EIndexType_Name (indexType). c_str (), NKikimrSchemeOp::EIndexType_Name (indexType). c_str ()) );
656
653
env.TestWaitNotification (runtime, txId);
657
654
658
655
// should not affect index limits
@@ -716,7 +713,6 @@ Y_UNIT_TEST_SUITE(IndexBuildTest) {
716
713
void CheckLimitWithDroppedIndex (NKikimrSchemeOp::EIndexType indexType) {
717
714
TTestBasicRuntime runtime;
718
715
TTestEnv env (runtime);
719
- runtime.GetAppData ().FeatureFlags .SetEnableAddUniqueIndex (true );
720
716
ui64 txId = 100 ;
721
717
722
718
TSchemeLimits lowLimits;
@@ -755,7 +751,6 @@ Y_UNIT_TEST_SUITE(IndexBuildTest) {
755
751
void Lock (NKikimrSchemeOp::EIndexType indexType) {
756
752
TTestBasicRuntime runtime;
757
753
TTestEnv env (runtime);
758
- runtime.GetAppData ().FeatureFlags .SetEnableAddUniqueIndex (true );
759
754
ui64 txId = 100 ;
760
755
761
756
// Just create main table
@@ -846,7 +841,6 @@ Y_UNIT_TEST_SUITE(IndexBuildTest) {
846
841
opts.EnableBackgroundCompaction (false );
847
842
opts.DisableStatsBatching (true );
848
843
TTestEnv env (runtime, opts);
849
- runtime.GetAppData ().FeatureFlags .SetEnableAddUniqueIndex (true );
850
844
851
845
NDataShard::gDbStatsReportInterval = TDuration::Seconds (0 );
852
846
@@ -1031,7 +1025,6 @@ Y_UNIT_TEST_SUITE(IndexBuildTest) {
1031
1025
void IndexPartitioningIsPersisted (NKikimrSchemeOp::EIndexType indexType) {
1032
1026
TTestBasicRuntime runtime;
1033
1027
TTestEnv env (runtime);
1034
- runtime.GetAppData ().FeatureFlags .SetEnableAddUniqueIndex (true );
1035
1028
ui64 txId = 100 ;
1036
1029
1037
1030
TestCreateTable (runtime, ++txId, " /MyRoot" , R"(
@@ -1112,10 +1105,8 @@ Y_UNIT_TEST_SUITE(IndexBuildTest) {
1112
1105
void DropIndex (NKikimrSchemeOp::EIndexType indexType) {
1113
1106
TTestBasicRuntime runtime;
1114
1107
TTestEnv env (runtime);
1115
- runtime.GetAppData ().FeatureFlags .SetEnableAddUniqueIndex (true );
1116
1108
ui64 txId = 100 ;
1117
1109
1118
- const TString indexTypeStr = (indexType == NKikimrSchemeOp::EIndexType::EIndexTypeGlobal) ? " EIndexTypeGlobal" : " EIndexTypeGlobalUnique" ;
1119
1110
TestCreateIndexedTable (runtime, ++txId, " /MyRoot" , Sprintf (R"(
1120
1111
TableDescription {
1121
1112
Name: "Table"
@@ -1134,7 +1125,7 @@ Y_UNIT_TEST_SUITE(IndexBuildTest) {
1134
1125
Type: %s
1135
1126
KeyColumnNames: ["value1"]
1136
1127
}
1137
- )" , indexTypeStr .c_str (), indexTypeStr .c_str ()));
1128
+ )" , NKikimrSchemeOp::EIndexType_Name (indexType) .c_str (), NKikimrSchemeOp::EIndexType_Name (indexType) .c_str ()));
1138
1129
env.TestWaitNotification (runtime, txId);
1139
1130
1140
1131
TestDescribeResult (DescribePath (runtime, " /MyRoot/Table" ),
@@ -1196,10 +1187,8 @@ Y_UNIT_TEST_SUITE(IndexBuildTest) {
1196
1187
void RejectsDropIndex (NKikimrSchemeOp::EIndexType indexType) {
1197
1188
TTestBasicRuntime runtime;
1198
1189
TTestEnv env (runtime);
1199
- runtime.GetAppData ().FeatureFlags .SetEnableAddUniqueIndex (true );
1200
1190
ui64 txId = 100 ;
1201
1191
1202
- const TString indexTypeStr = (indexType == NKikimrSchemeOp::EIndexType::EIndexTypeGlobal) ? " EIndexTypeGlobal" : " EIndexTypeGlobalUnique" ;
1203
1192
TestCreateIndexedTable (runtime, ++txId, " /MyRoot" , Sprintf (R"(
1204
1193
TableDescription {
1205
1194
Name: "Table"
@@ -1213,7 +1202,7 @@ Y_UNIT_TEST_SUITE(IndexBuildTest) {
1213
1202
Type: %s
1214
1203
KeyColumnNames: ["value0"]
1215
1204
}
1216
- )" , indexTypeStr .c_str ()));
1205
+ )" , NKikimrSchemeOp::EIndexType_Name (indexType) .c_str ()));
1217
1206
env.TestWaitNotification (runtime, txId);
1218
1207
1219
1208
TestDescribeResult (DescribePath (runtime, " /MyRoot/Table" ),
@@ -1281,7 +1270,6 @@ Y_UNIT_TEST_SUITE(IndexBuildTest) {
1281
1270
void CancelBuild (NKikimrSchemeOp::EIndexType indexType) {
1282
1271
TTestBasicRuntime runtime;
1283
1272
TTestEnv env (runtime);
1284
- runtime.GetAppData ().FeatureFlags .SetEnableAddUniqueIndex (true );
1285
1273
ui64 txId = 100 ;
1286
1274
1287
1275
runtime.SetLogPriority (NKikimrServices::TX_DATASHARD, NLog::PRI_TRACE);
@@ -1356,7 +1344,6 @@ Y_UNIT_TEST_SUITE(IndexBuildTest) {
1356
1344
void RejectsCancel (NKikimrSchemeOp::EIndexType indexType) {
1357
1345
TTestBasicRuntime runtime;
1358
1346
TTestEnv env (runtime);
1359
- runtime.GetAppData ().FeatureFlags .SetEnableAddUniqueIndex (true );
1360
1347
ui64 txId = 100 ;
1361
1348
1362
1349
runtime.SetLogPriority (NKikimrServices::TX_DATASHARD, NLog::PRI_TRACE);
@@ -1494,7 +1481,6 @@ Y_UNIT_TEST_SUITE(IndexBuildTest) {
1494
1481
void RejectsOnDuplicatesUniq (bool crossShardDuplicates) {
1495
1482
TTestBasicRuntime runtime;
1496
1483
TTestEnv env (runtime);
1497
- runtime.GetAppData ().FeatureFlags .SetEnableAddUniqueIndex (true );
1498
1484
ui64 txId = 100 ;
1499
1485
1500
1486
runtime.SetLogPriority (NKikimrServices::TX_DATASHARD, NLog::PRI_TRACE);
@@ -1575,7 +1561,6 @@ Y_UNIT_TEST_SUITE(IndexBuildTest) {
1575
1561
Y_UNIT_TEST (NullsAreUniq) {
1576
1562
TTestBasicRuntime runtime;
1577
1563
TTestEnv env (runtime);
1578
- runtime.GetAppData ().FeatureFlags .SetEnableAddUniqueIndex (true );
1579
1564
ui64 txId = 100 ;
1580
1565
1581
1566
runtime.SetLogPriority (NKikimrServices::TX_DATASHARD, NLog::PRI_TRACE);
0 commit comments