Skip to content

Commit 7e64fdb

Browse files
authored
25-1 EnableLocalDBBtreeIndex = true (#19440)
2 parents 60cf160 + 74d57f9 commit 7e64fdb

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

ydb/core/protos/feature_flags.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ message TFeatureFlags {
131131
optional bool EnableStatistics = 106 [default = true];
132132
optional bool EnableUuidAsPrimaryKey = 107 [default = true];
133133
optional bool EnableTablePgTypes = 108 [default = false];
134-
optional bool EnableLocalDBBtreeIndex = 109 [default = false];
134+
optional bool EnableLocalDBBtreeIndex = 109 [default = true];
135135
optional bool EnablePDiskHighHDDInFlight = 110 [default = false];
136136
reserved 111; // UseVDisksBalancing
137137
optional bool EnableViews = 112 [default = true];

ydb/core/tablet_flat/flat_executor_ut.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6719,14 +6719,14 @@ Y_UNIT_TEST_SUITE(TFlatTableExecutor_BTreeIndex) {
67196719
}
67206720
};
67216721

6722-
Y_UNIT_TEST(EnableLocalDBBtreeIndex_Default) { // uses flat index
6722+
Y_UNIT_TEST(EnableLocalDBBtreeIndex_Default) { // uses b-tree index
67236723
TMyEnvBase env;
67246724
TRowsModel rows;
67256725

67266726
auto &appData = env->GetAppData();
67276727
UNIT_ASSERT_VALUES_EQUAL(appData.FeatureFlags.HasEnableLocalDBBtreeIndex(), false);
67286728
UNIT_ASSERT_VALUES_EQUAL(appData.FeatureFlags.HasEnableLocalDBFlatIndex(), false);
6729-
UNIT_ASSERT_VALUES_EQUAL(appData.FeatureFlags.GetEnableLocalDBBtreeIndex(), false);
6729+
UNIT_ASSERT_VALUES_EQUAL(appData.FeatureFlags.GetEnableLocalDBBtreeIndex(), true);
67306730
UNIT_ASSERT_VALUES_EQUAL(appData.FeatureFlags.GetEnableLocalDBFlatIndex(), true);
67316731
auto counters = GetSharedPageCounters(env);
67326732
int readRows = 0, failedAttempts = 0;
@@ -6743,8 +6743,8 @@ Y_UNIT_TEST_SUITE(TFlatTableExecutor_BTreeIndex) {
67436743
env.SendSync(new NFake::TEvCompact(TRowsModel::TableId));
67446744
env.WaitFor<NFake::TEvCompacted>();
67456745

6746-
// all pages are always kept in shared cache
6747-
UNIT_ASSERT_VALUES_EQUAL(counters->ActivePages->Val(), 290);
6746+
// all pages are always kept in shared cache (except flat index)
6747+
UNIT_ASSERT_VALUES_EQUAL(counters->ActivePages->Val(), 334);
67486748

67496749
env.SendSync(new NFake::TEvExecute{ new TTxFullScan(readRows, failedAttempts) });
67506750
UNIT_ASSERT_VALUES_EQUAL(readRows, 1000);
@@ -6754,10 +6754,10 @@ Y_UNIT_TEST_SUITE(TFlatTableExecutor_BTreeIndex) {
67546754
env.SendSync(new TEvents::TEvPoison, false, true);
67556755
env.FireDummyTablet(ui32(NFake::TDummy::EFlg::Comp));
67566756

6757-
// after restart we have no pages in private cache except flat index
6757+
// after restart we have no pages in private cache
67586758
env.SendSync(new NFake::TEvExecute{ new TTxFullScan(readRows, failedAttempts) }, true);
67596759
UNIT_ASSERT_VALUES_EQUAL(readRows, 1000);
6760-
UNIT_ASSERT_VALUES_EQUAL(failedAttempts, 286);
6760+
UNIT_ASSERT_VALUES_EQUAL(failedAttempts, 330);
67616761
}
67626762

67636763
Y_UNIT_TEST(EnableLocalDBBtreeIndex_True) { // uses b-tree index

0 commit comments

Comments
 (0)