From b6238779ef0ba3a082e5753206eba046f926bc6c Mon Sep 17 00:00:00 2001 From: kungasc Date: Fri, 29 Dec 2023 15:39:45 +0000 Subject: [PATCH] cr: fix grammar --- .../tablet_flat/benchmark/b_part_index.cpp | 2 +- ydb/core/tablet_flat/flat_page_btree_index.h | 24 ++++++++--------- .../flat_page_btree_index_writer.h | 26 +++++++++---------- .../tablet_flat/flat_part_btree_index_iter.h | 20 +++++++------- .../flat_part_charge_btree_index.h | 26 +++++++++---------- ydb/core/tablet_flat/flat_part_dump.cpp | 2 +- ydb/core/tablet_flat/flat_part_loader.cpp | 6 ++--- ydb/core/tablet_flat/flat_part_writer.h | 6 ++--- .../tablet_flat/protos/flat_table_part.proto | 6 ++--- .../tablet_flat/test/libs/table/test_writer.h | 6 ++--- ydb/core/tablet_flat/ut/ut_btree_index.cpp | 24 ++++++++--------- ydb/core/tablet_flat/ut/ut_part.cpp | 2 +- .../ut_large/ut_btree_index_large.cpp | 12 ++++----- 13 files changed, 81 insertions(+), 81 deletions(-) diff --git a/ydb/core/tablet_flat/benchmark/b_part_index.cpp b/ydb/core/tablet_flat/benchmark/b_part_index.cpp index bdc875909192..c991a2d13fff 100644 --- a/ydb/core/tablet_flat/benchmark/b_part_index.cpp +++ b/ydb/core/tablet_flat/benchmark/b_part_index.cpp @@ -70,7 +70,7 @@ namespace { Cerr << "DataBytes = " << part->Stat.Bytes << " DataPages = " << IndexTools::CountMainPages(*part) << Endl; Cerr << "FlatIndexBytes = " << part->GetPageSize(part->IndexPages.Groups[groups ? 1 : 0], {}) << " BTreeIndexBytes = " << part->IndexPages.BTreeGroups[groups ? 1 : 0].IndexSize << Endl; - Cerr << "Levels = " << part->IndexPages.BTreeGroups[groups ? 1 : 0].LevelsCount << Endl; + Cerr << "Levels = " << part->IndexPages.BTreeGroups[groups ? 1 : 0].LevelCount << Endl; // 100 MB UNIT_ASSERT_GE(part->Stat.Bytes, 100ull*1024*1024); diff --git a/ydb/core/tablet_flat/flat_page_btree_index.h b/ydb/core/tablet_flat/flat_page_btree_index.h index 54c94909dd26..0fc722dcce92 100644 --- a/ydb/core/tablet_flat/flat_page_btree_index.h +++ b/ydb/core/tablet_flat/flat_page_btree_index.h @@ -85,7 +85,7 @@ namespace NKikimr::NTable::NPage { struct TShortChild { TPageId PageId; - TRowId RowsCount; + TRowId RowCount; ui64 DataSize; auto operator<=>(const TShortChild&) const = default; @@ -95,22 +95,22 @@ namespace NKikimr::NTable::NPage { struct TChild { TPageId PageId; - TRowId RowsCount; + TRowId RowCount; ui64 DataSize; - TRowId ErasedRowsCount; + TRowId ErasedRowCount; auto operator<=>(const TChild&) const = default; TString ToString() const noexcept { - return TStringBuilder() << "PageId: " << PageId << " RowsCount: " << RowsCount << " DataSize: " << DataSize << " ErasedRowsCount: " << ErasedRowsCount; + return TStringBuilder() << "PageId: " << PageId << " RowCount: " << RowCount << " DataSize: " << DataSize << " ErasedRowCount: " << ErasedRowCount; } } Y_PACKED; static_assert(sizeof(TChild) == 28, "Invalid TBtreeIndexNode TChild size"); static_assert(offsetof(TChild, PageId) == offsetof(TShortChild, PageId)); - static_assert(offsetof(TChild, RowsCount) == offsetof(TShortChild, RowsCount)); + static_assert(offsetof(TChild, RowCount) == offsetof(TShortChild, RowCount)); static_assert(offsetof(TChild, DataSize) == offsetof(TShortChild, DataSize)); #pragma pack(pop) @@ -306,7 +306,7 @@ namespace NKikimr::NTable::NPage { { if (Header->IsShortChildFormat) { const TShortChild* const shortChild = TDeref::At(Children, pos * sizeof(TShortChild)); - return { shortChild->PageId, shortChild->RowsCount, shortChild->DataSize, 0 }; + return { shortChild->PageId, shortChild->RowCount, shortChild->DataSize, 0 }; } else { return *TDeref::At(Children, pos * sizeof(TChild)); } @@ -326,19 +326,19 @@ namespace NKikimr::NTable::NPage { auto range = xrange(0u, childrenCount); const auto cmp = [this](TRowId rowId, TPos pos) { - return rowId < GetShortChild(pos).RowsCount; + return rowId < GetShortChild(pos).RowCount; }; TRecIdx result; if (!on) { // Will do a full binary search on full range - } else if (GetShortChild(*on).RowsCount <= rowId) { + } else if (GetShortChild(*on).RowCount <= rowId) { // Try a short linear search first result = *on; for (int linear = 0; linear < 4; ++linear) { result++; Y_ABORT_UNLESS(result < childrenCount, "Should always seek some child"); - if (GetShortChild(result).RowsCount > rowId) { + if (GetShortChild(result).RowCount > rowId) { return result; } } @@ -352,7 +352,7 @@ namespace NKikimr::NTable::NPage { if (result == 0) { return 0; } - if (GetShortChild(result - 1).RowsCount <= rowId) { + if (GetShortChild(result - 1).RowCount <= rowId) { return result; } result--; @@ -464,14 +464,14 @@ namespace NKikimr::NTable::NPage { }; struct TBtreeIndexMeta : public TBtreeIndexNode::TChild { - ui32 LevelsCount; + ui32 LevelCount; ui64 IndexSize; auto operator<=>(const TBtreeIndexMeta&) const = default; TString ToString() const noexcept { - return TStringBuilder() << TBtreeIndexNode::TChild::ToString() << " LevelsCount: " << LevelsCount << " IndexSize: " << IndexSize; + return TStringBuilder() << TBtreeIndexNode::TChild::ToString() << " LevelCount: " << LevelCount << " IndexSize: " << IndexSize; } }; } diff --git a/ydb/core/tablet_flat/flat_page_btree_index_writer.h b/ydb/core/tablet_flat/flat_page_btree_index_writer.h index ee8ad40278cf..2a4627bf7e2d 100644 --- a/ydb/core/tablet_flat/flat_page_btree_index_writer.h +++ b/ydb/core/tablet_flat/flat_page_btree_index_writer.h @@ -50,7 +50,7 @@ namespace NKikimr::NTable::NPage { } void AddChild(TChild child) { - Y_ABORT_UNLESS(child.ErasedRowsCount == 0 || !IsShortChildFormat(), "Short format can't have ErasedRowsCount"); + Y_ABORT_UNLESS(child.ErasedRowCount == 0 || !IsShortChildFormat(), "Short format can't have ErasedRowCount"); Children.push_back(child); } @@ -249,7 +249,7 @@ namespace NKikimr::NTable::NPage { void PlaceChild(const TChild& child) noexcept { if (IsShortChildFormat()) { - Place() = TShortChild{child.PageId, child.RowsCount, child.DataSize}; + Place() = TShortChild{child.PageId, child.RowCount, child.DataSize}; } else { Place() = child; } @@ -375,14 +375,14 @@ namespace NKikimr::NTable::NPage { } void AddShortChild(TShortChild child) { - AddChild(TChild{child.PageId, child.RowsCount, child.DataSize, 0}); + AddChild(TChild{child.PageId, child.RowCount, child.DataSize, 0}); } void AddChild(TChild child) { // aggregate in order to perform search by row id from any leaf node - child.RowsCount = (ChildrenRowsCount += child.RowsCount); - child.DataSize = (ChildrenSize += child.DataSize); - child.ErasedRowsCount = (ChildrenErasedRowsCount += child.ErasedRowsCount); + child.RowCount = (ChildRowCount += child.RowCount); + child.DataSize = (ChildSize += child.DataSize); + child.ErasedRowCount = (ChildErasedRowCount += child.ErasedRowCount); Levels[0].PushChild(child); } @@ -409,9 +409,9 @@ namespace NKikimr::NTable::NPage { IndexSize = 0; Writer.Reset(); Levels = { TLevel() }; - ChildrenRowsCount = 0; - ChildrenErasedRowsCount = 0; - ChildrenSize = 0; + ChildRowCount = 0; + ChildErasedRowCount = 0; + ChildSize = 0; } private: @@ -463,7 +463,7 @@ namespace NKikimr::NTable::NPage { if (levelIndex + 1 == Levels.size()) { Levels.emplace_back(); } - Levels[levelIndex + 1].PushChild(TChild{pageId, lastChild.RowsCount, lastChild.DataSize, lastChild.ErasedRowsCount}); + Levels[levelIndex + 1].PushChild(TChild{pageId, lastChild.RowCount, lastChild.DataSize, lastChild.ErasedRowCount}); if (!last) { Levels[levelIndex + 1].PushKey(Levels[levelIndex].PopKey()); } @@ -498,9 +498,9 @@ namespace NKikimr::NTable::NPage { const ui32 NodeKeysMin; const ui32 NodeKeysMax; - TRowId ChildrenRowsCount = 0; - TRowId ChildrenErasedRowsCount = 0; - ui64 ChildrenSize = 0; + TRowId ChildRowCount = 0; + TRowId ChildErasedRowCount = 0; + ui64 ChildSize = 0; }; } diff --git a/ydb/core/tablet_flat/flat_part_btree_index_iter.h b/ydb/core/tablet_flat/flat_part_btree_index_iter.h index 2d1617d64e56..d924e670de40 100644 --- a/ydb/core/tablet_flat/flat_part_btree_index_iter.h +++ b/ydb/core/tablet_flat/flat_part_btree_index_iter.h @@ -115,7 +115,7 @@ class TPartBtreeIndexIt : public IIndexIter { , GroupId(groupId) , GroupInfo(part->Scheme->GetLayout(groupId)) , Meta(groupId.IsHistoric() ? part->IndexPages.BTreeHistoric[groupId.Index] : part->IndexPages.BTreeGroups[groupId.Index]) - , State(Reserve(Meta.LevelsCount + 1)) + , State(Reserve(Meta.LevelCount + 1)) { const static TCellsIterable EmptyKey(static_cast(nullptr), TColumns()); State.emplace_back(Meta, 0, GetEndRowId(), EmptyKey, EmptyKey); @@ -180,7 +180,7 @@ class TPartBtreeIndexIt : public IIndexIter { EReady Next() override { Y_ABORT_UNLESS(!IsExhausted()); - if (Meta.LevelsCount == 0) { + if (Meta.LevelCount == 0) { return Exhaust(); } @@ -194,7 +194,7 @@ class TPartBtreeIndexIt : public IIndexIter { PushNextState(*State.back().Pos + 1); } - for (ui32 level : xrange(State.size() - 1, Meta.LevelsCount)) { + for (ui32 level : xrange(State.size() - 1, Meta.LevelCount)) { if (!TryLoad(State[level])) { // exiting with an intermediate state Y_DEBUG_ABORT_UNLESS(!IsLeaf() && !IsExhausted()); @@ -211,7 +211,7 @@ class TPartBtreeIndexIt : public IIndexIter { EReady Prev() override { Y_ABORT_UNLESS(!IsExhausted()); - if (Meta.LevelsCount == 0) { + if (Meta.LevelCount == 0) { return Exhaust(); } @@ -225,7 +225,7 @@ class TPartBtreeIndexIt : public IIndexIter { PushNextState(*State.back().Pos - 1); } - for (ui32 level : xrange(State.size() - 1, Meta.LevelsCount)) { + for (ui32 level : xrange(State.size() - 1, Meta.LevelCount)) { if (!TryLoad(State[level])) { // exiting with an intermediate state Y_DEBUG_ABORT_UNLESS(!IsLeaf() && !IsExhausted()); @@ -246,7 +246,7 @@ class TPartBtreeIndexIt : public IIndexIter { } TRowId GetEndRowId() const override { - return Meta.RowsCount; + return Meta.RowCount; } TPageId GetPageId() const override { @@ -286,7 +286,7 @@ class TPartBtreeIndexIt : public IIndexIter { State[0].Pos = { }; } - for (ui32 level : xrange(State.size() - 1, Meta.LevelsCount)) { + for (ui32 level : xrange(State.size() - 1, Meta.LevelCount)) { auto &state = State[level]; Y_DEBUG_ABORT_UNLESS(seek.BelongsTo(state)); if (!TryLoad(state)) { @@ -316,7 +316,7 @@ class TPartBtreeIndexIt : public IIndexIter { bool IsLeaf() const noexcept { // Note: it is possible to have 0 levels in B-Tree // so we may have exhausted state with leaf (data) node - return State.size() == Meta.LevelsCount + 1 && !IsExhausted(); + return State.size() == Meta.LevelCount + 1 && !IsExhausted(); } EReady Exhaust() { @@ -334,8 +334,8 @@ class TPartBtreeIndexIt : public IIndexIter { auto child = current.Node->GetChild(pos); - TRowId beginRowId = pos ? current.Node->GetChild(pos - 1).RowsCount : current.BeginRowId; - TRowId endRowId = child.RowsCount; + TRowId beginRowId = pos ? current.Node->GetChild(pos - 1).RowCount : current.BeginRowId; + TRowId endRowId = child.RowCount; TCellsIterable beginKey = pos ? current.Node->GetKeyCellsIterable(pos - 1, GroupInfo.ColsKeyIdx) : current.BeginKey; TCellsIterable endKey = pos < current.Node->GetKeysCount() ? current.Node->GetKeyCellsIterable(pos, GroupInfo.ColsKeyIdx) : current.EndKey; diff --git a/ydb/core/tablet_flat/flat_part_charge_btree_index.h b/ydb/core/tablet_flat/flat_part_charge_btree_index.h index 1574b1c04019..5876cc2eea65 100644 --- a/ydb/core/tablet_flat/flat_part_charge_btree_index.h +++ b/ydb/core/tablet_flat/flat_part_charge_btree_index.h @@ -35,7 +35,7 @@ class TChargeBTreeIndex : public ICharge { const auto& meta = Part->IndexPages.BTreeGroups[0]; - if (Y_UNLIKELY(row1 >= meta.RowsCount)) { + if (Y_UNLIKELY(row1 >= meta.RowCount)) { return { true, true }; // already out of bounds, nothing to precharge } if (Y_UNLIKELY(row1 > row2)) { @@ -43,8 +43,8 @@ class TChargeBTreeIndex : public ICharge { } TVector level, nextLevel(Reserve(2)); - for (ui32 high = 0; high < meta.LevelsCount && ready; high++) { - if (high == 0) { + for (ui32 height = 0; height < meta.LevelCount && ready; height++) { + if (height == 0) { ready &= TryLoadNode(meta.PageId, nextLevel); } else { for (ui32 i : xrange(level.size())) { @@ -52,7 +52,7 @@ class TChargeBTreeIndex : public ICharge { if (i == 0) { from = level[i].Seek(row1); } - if (i + 1 == level.size() && row2 < meta.RowsCount) { + if (i + 1 == level.size() && row2 < meta.RowCount) { to = level[i].Seek(row2); } for (TRecIdx j : xrange(from, to + 1)) { @@ -70,7 +70,7 @@ class TChargeBTreeIndex : public ICharge { return {false, false}; } - if (meta.LevelsCount == 0) { + if (meta.LevelCount == 0) { ready &= HasDataPage(meta.PageId, { }); } else { for (ui32 i : xrange(level.size())) { @@ -78,7 +78,7 @@ class TChargeBTreeIndex : public ICharge { if (i == 0) { from = level[i].Seek(row1); } - if (i + 1 == level.size() && row2 < meta.RowsCount) { + if (i + 1 == level.size() && row2 < meta.RowCount) { to = level[i].Seek(row2); } for (TRecIdx j : xrange(from, to + 1)) { @@ -103,8 +103,8 @@ class TChargeBTreeIndex : public ICharge { const auto& meta = Part->IndexPages.BTreeGroups[0]; - if (Y_UNLIKELY(row1 >= meta.RowsCount)) { - row1 = meta.RowsCount - 1; // start from the last row + if (Y_UNLIKELY(row1 >= meta.RowCount)) { + row1 = meta.RowCount - 1; // start from the last row } if (Y_UNLIKELY(row1 < row2)) { row2 = row1; // will not go further than row1 @@ -112,8 +112,8 @@ class TChargeBTreeIndex : public ICharge { // level contains nodes in reverse order TVector level, nextLevel(Reserve(2)); - for (ui32 high = 0; high < meta.LevelsCount && ready; high++) { - if (high == 0) { + for (ui32 height = 0; height < meta.LevelCount && ready; height++) { + if (height == 0) { ready &= TryLoadNode(meta.PageId, nextLevel); } else { for (ui32 i : xrange(level.size())) { @@ -121,7 +121,7 @@ class TChargeBTreeIndex : public ICharge { if (i == 0) { from = level[i].Seek(row1); } - if (i + 1 == level.size() && row2 < meta.RowsCount) { + if (i + 1 == level.size() && row2 < meta.RowCount) { to = level[i].Seek(row2); } for (TRecIdx j = from + 1; j > to; j--) { @@ -139,7 +139,7 @@ class TChargeBTreeIndex : public ICharge { return {false, false}; } - if (meta.LevelsCount == 0) { + if (meta.LevelCount == 0) { ready &= HasDataPage(meta.PageId, { }); } else { for (ui32 i : xrange(level.size())) { @@ -147,7 +147,7 @@ class TChargeBTreeIndex : public ICharge { if (i == 0) { from = level[i].Seek(row1); } - if (i + 1 == level.size() && row2 < meta.RowsCount) { + if (i + 1 == level.size() && row2 < meta.RowCount) { to = level[i].Seek(row2); } for (TRecIdx j = from + 1; j > to; j--) { diff --git a/ydb/core/tablet_flat/flat_part_dump.cpp b/ydb/core/tablet_flat/flat_part_dump.cpp index 976fe8fbc2ba..d7a83f037305 100644 --- a/ydb/core/tablet_flat/flat_part_dump.cpp +++ b/ydb/core/tablet_flat/flat_part_dump.cpp @@ -168,7 +168,7 @@ namespace { { if (part.IndexPages.BTreeGroups) { auto meta = part.IndexPages.BTreeGroups.front(); - if (meta.LevelsCount) { + if (meta.LevelCount) { BTreeIndexNode(part, meta); } else { Out diff --git a/ydb/core/tablet_flat/flat_part_loader.cpp b/ydb/core/tablet_flat/flat_part_loader.cpp index 6b1eaa6b1578..294e2be31516 100644 --- a/ydb/core/tablet_flat/flat_part_loader.cpp +++ b/ydb/core/tablet_flat/flat_part_loader.cpp @@ -83,10 +83,10 @@ void TLoader::StageParseMeta() noexcept for (const auto &meta : history ? layout.GetBTreeHistoricIndexes() : layout.GetBTreeGroupIndexes()) { NPage::TBtreeIndexMeta converted{{ meta.GetRootPageId(), - meta.GetRowsCount(), + meta.GetRowCount(), meta.GetDataSize(), - meta.GetErasedRowsCount()}, - meta.GetLevelsCount(), + meta.GetErasedRowCount()}, + meta.GetLevelCount(), meta.GetIndexSize()}; (history ? BTreeHistoricIndexes : BTreeGroupIndexes).push_back(converted); } diff --git a/ydb/core/tablet_flat/flat_part_writer.h b/ydb/core/tablet_flat/flat_part_writer.h index 6d08ad9cfc37..572f1e8d54fc 100644 --- a/ydb/core/tablet_flat/flat_part_writer.h +++ b/ydb/core/tablet_flat/flat_part_writer.h @@ -666,11 +666,11 @@ namespace NTable { for (auto meta : history ? Current.BTreeHistoricIndexes : Current.BTreeGroupIndexes) { auto m = history ? lay->AddBTreeHistoricIndexes() : lay->AddBTreeGroupIndexes(); m->SetRootPageId(meta.PageId); - m->SetLevelsCount(meta.LevelsCount); + m->SetLevelCount(meta.LevelCount); m->SetIndexSize(meta.IndexSize); m->SetDataSize(meta.DataSize); - m->SetRowsCount(meta.RowsCount); - m->SetErasedRowsCount(meta.ErasedRowsCount); + m->SetRowCount(meta.RowCount); + m->SetErasedRowCount(meta.ErasedRowCount); } } diff --git a/ydb/core/tablet_flat/protos/flat_table_part.proto b/ydb/core/tablet_flat/protos/flat_table_part.proto index 2ff6c4468035..00efe95b59f8 100644 --- a/ydb/core/tablet_flat/protos/flat_table_part.proto +++ b/ydb/core/tablet_flat/protos/flat_table_part.proto @@ -25,11 +25,11 @@ message TPartScheme { message TBTreeIndexMeta { optional uint32 RootPageId = 1; - optional uint32 LevelsCount = 2; + optional uint32 LevelCount = 2; optional uint64 IndexSize = 3; optional uint64 DataSize = 4; - optional uint64 RowsCount = 5; // Total number of data rows - optional uint64 ErasedRowsCount = 6; // Total number of erased data rows + optional uint64 RowCount = 5; // Total number of data rows + optional uint64 ErasedRowCount = 6; // Total number of erased data rows } message TLayout { diff --git a/ydb/core/tablet_flat/test/libs/table/test_writer.h b/ydb/core/tablet_flat/test/libs/table/test_writer.h index cc6f897e17d3..5ed43de879d2 100644 --- a/ydb/core/tablet_flat/test/libs/table/test_writer.h +++ b/ydb/core/tablet_flat/test/libs/table/test_writer.h @@ -129,10 +129,10 @@ namespace NTest { for (const auto &meta : history ? lay.GetBTreeHistoricIndexes() : lay.GetBTreeGroupIndexes()) { NPage::TBtreeIndexMeta converted{{ meta.GetRootPageId(), - meta.GetRowsCount(), + meta.GetRowCount(), meta.GetDataSize(), - meta.GetErasedRowsCount()}, - meta.GetLevelsCount(), + meta.GetErasedRowCount()}, + meta.GetLevelCount(), meta.GetIndexSize()}; (history ? BTreeHistoricIndexes : BTreeGroupIndexes).push_back(converted); } diff --git a/ydb/core/tablet_flat/ut/ut_btree_index.cpp b/ydb/core/tablet_flat/ut/ut_btree_index.cpp index 5b44aa5daa26..1ef4a8923013 100644 --- a/ydb/core/tablet_flat/ut/ut_btree_index.cpp +++ b/ydb/core/tablet_flat/ut/ut_btree_index.cpp @@ -18,7 +18,7 @@ namespace { const TSharedData* TryGetPage(const TPart *part, TPageId pageId, TGroupId groupId) override { Touched[groupId].insert(pageId); - if (Has[groupId].contains(pageId)) { + if (Loaded[groupId].contains(pageId)) { return NTest::TTestEnv::TryGetPage(part, pageId, groupId); } return nullptr; @@ -27,7 +27,7 @@ namespace { static void LoadTouched(IPages& env, bool clearHas) { auto touchEnv = dynamic_cast(&env); if (touchEnv) { - auto &has = touchEnv->Has; + auto &has = touchEnv->Loaded; auto &touched = touchEnv->Touched; if (clearHas) { @@ -40,7 +40,7 @@ namespace { } } - TMap> Has; + TMap> Loaded; TMap> Touched; }; @@ -174,7 +174,7 @@ namespace { UNIT_ASSERT_VALUES_EQUAL(node.GetKeysCount() + 1, children.size()); for (TRecIdx i : xrange(node.GetKeysCount() + 1)) { UNIT_ASSERT_EQUAL(node.GetChild(i), children[i]); - TShortChild shortChild{children[i].PageId, children[i].RowsCount, children[i].DataSize}; + TShortChild shortChild{children[i].PageId, children[i].RowCount, children[i].DataSize}; UNIT_ASSERT_EQUAL(node.GetShortChild(i), shortChild); } } @@ -314,7 +314,7 @@ Y_UNIT_TEST_SUITE(TBtreeIndexNode) { writer.AddKey(deserialized.GetCells()); } for (auto &c : children) { - c.ErasedRowsCount = 0; + c.ErasedRowCount = 0; writer.AddChild(c); } @@ -359,7 +359,7 @@ Y_UNIT_TEST_SUITE(TBtreeIndexNode) { writer.AddKey(deserialized.GetCells()); } for (auto &c : children) { - c.ErasedRowsCount = 0; + c.ErasedRowCount = 0; writer.AddChild(c); } @@ -594,7 +594,7 @@ Y_UNIT_TEST_SUITE(TBtreeIndexBuilder) { Dump(*result, builder.GroupInfo, pager.Back()); - UNIT_ASSERT_VALUES_EQUAL(result->LevelsCount, 3); + UNIT_ASSERT_VALUES_EQUAL(result->LevelCount, 3); auto checkKeys = [&](TPageId pageId, const TVector& keys) { CheckKeys(pageId, keys, builder.GroupInfo, pager.Back()); @@ -644,9 +644,9 @@ Y_UNIT_TEST_SUITE(TBtreeIndexBuilder) { TBtreeIndexMeta expected{{9, 0, 0, 0}, 3, 1550}; for (auto c : children) { - expected.RowsCount += c.RowsCount; + expected.RowCount += c.RowCount; expected.DataSize += c.DataSize; - expected.ErasedRowsCount += c.ErasedRowsCount; + expected.ErasedRowCount += c.ErasedRowCount; } UNIT_ASSERT_EQUAL_C(*result, expected, "Got " + result->ToString()); } @@ -1094,7 +1094,7 @@ Y_UNIT_TEST_SUITE(TPartBtreeIndexIt) { Cerr << DumpPart(part, 1) << Endl; - UNIT_ASSERT_VALUES_EQUAL(part.IndexPages.BTreeGroups[0].LevelsCount, levels); + UNIT_ASSERT_VALUES_EQUAL(part.IndexPages.BTreeGroups[0].LevelCount, levels); CheckSeekRowId(part); CheckSeekRowId(part); @@ -1156,7 +1156,7 @@ Y_UNIT_TEST_SUITE(TChargeBTreeIndex) { } void AssertEqual(const TPartStore& part, const TTouchEnv& bTree, const TTouchEnv& flat, const TString& message) { - AssertEqual(part, bTree.Has, flat.Has, message); + AssertEqual(part, bTree.Loaded, flat.Loaded, message); AssertEqual(part, bTree.Touched, flat.Touched, message); } @@ -1211,7 +1211,7 @@ Y_UNIT_TEST_SUITE(TChargeBTreeIndex) { Cerr << DumpPart(part, 1) << Endl; - UNIT_ASSERT_VALUES_EQUAL(part.IndexPages.BTreeGroups[0].LevelsCount, levels); + UNIT_ASSERT_VALUES_EQUAL(part.IndexPages.BTreeGroups[0].LevelCount, levels); auto tags = TVector(); for (auto c : eggs.Scheme->Cols) { diff --git a/ydb/core/tablet_flat/ut/ut_part.cpp b/ydb/core/tablet_flat/ut/ut_part.cpp index 9be2c733299a..9d5c21c44758 100644 --- a/ydb/core/tablet_flat/ut/ut_part.cpp +++ b/ydb/core/tablet_flat/ut/ut_part.cpp @@ -440,7 +440,7 @@ Y_UNIT_TEST_SUITE(TPart) { { /*_ Ensure that B-Tree index has enough layers */ if (part.IndexPages.BTreeGroups.size()) { - UNIT_ASSERT_VALUES_EQUAL(part.IndexPages.BTreeGroups[0].LevelsCount, 3); + UNIT_ASSERT_VALUES_EQUAL(part.IndexPages.BTreeGroups[0].LevelCount, 3); } } diff --git a/ydb/core/tablet_flat/ut_large/ut_btree_index_large.cpp b/ydb/core/tablet_flat/ut_large/ut_btree_index_large.cpp index 00df27c990dc..3af2bfb805a0 100644 --- a/ydb/core/tablet_flat/ut_large/ut_btree_index_large.cpp +++ b/ydb/core/tablet_flat/ut_large/ut_btree_index_large.cpp @@ -39,7 +39,7 @@ Y_UNIT_TEST_SUITE(TBtreeIndexTPartLarge) { UNIT_ASSERT_GE(part->Stat.Bytes, 1ull*1024*1024*1024); UNIT_ASSERT_LE(part->Stat.Bytes, 1ull*1024*1024*1024 + 100*1024*1024); - UNIT_ASSERT_VALUES_EQUAL(part->IndexPages.BTreeGroups[0].LevelsCount, 3); + UNIT_ASSERT_VALUES_EQUAL(part->IndexPages.BTreeGroups[0].LevelCount, 3); } Y_UNIT_TEST(MiddleKeys1GB) { @@ -69,7 +69,7 @@ Y_UNIT_TEST_SUITE(TBtreeIndexTPartLarge) { UNIT_ASSERT_GE(part->Stat.Bytes, 1ull*1024*1024*1024); UNIT_ASSERT_LE(part->Stat.Bytes, 1ull*1024*1024*1024 + 100*1024*1024); - UNIT_ASSERT_VALUES_EQUAL(part->IndexPages.BTreeGroups[0].LevelsCount, 3); + UNIT_ASSERT_VALUES_EQUAL(part->IndexPages.BTreeGroups[0].LevelCount, 3); } Y_UNIT_TEST(BigKeys1GB) { @@ -99,7 +99,7 @@ Y_UNIT_TEST_SUITE(TBtreeIndexTPartLarge) { UNIT_ASSERT_GE(part->Stat.Bytes, 1ull*1024*1024*1024); UNIT_ASSERT_LE(part->Stat.Bytes, 1ull*1024*1024*1024 + 100*1024*1024); - UNIT_ASSERT_VALUES_EQUAL(part->IndexPages.BTreeGroups[0].LevelsCount, 6); + UNIT_ASSERT_VALUES_EQUAL(part->IndexPages.BTreeGroups[0].LevelCount, 6); } Y_UNIT_TEST(CutKeys) { @@ -131,7 +131,7 @@ Y_UNIT_TEST_SUITE(TBtreeIndexTPartLarge) { UNIT_ASSERT_GE(part->Stat.Bytes, 1ull*1024*1024*1024); UNIT_ASSERT_LE(part->Stat.Bytes, 1ull*1024*1024*1024 + 100*1024*1024); - UNIT_ASSERT_VALUES_EQUAL(part->IndexPages.BTreeGroups[0].LevelsCount, 3); + UNIT_ASSERT_VALUES_EQUAL(part->IndexPages.BTreeGroups[0].LevelCount, 3); } Y_UNIT_TEST(Group) { @@ -162,7 +162,7 @@ Y_UNIT_TEST_SUITE(TBtreeIndexTPartLarge) { UNIT_ASSERT_GE(part->Stat.Bytes, 1ull*1024*1024*1024); UNIT_ASSERT_LE(part->Stat.Bytes, 1ull*1024*1024*1024 + 100*1024*1024); - UNIT_ASSERT_VALUES_EQUAL(part->IndexPages.BTreeGroups[1].LevelsCount, 2); + UNIT_ASSERT_VALUES_EQUAL(part->IndexPages.BTreeGroups[1].LevelCount, 2); } Y_UNIT_TEST(History) { @@ -193,7 +193,7 @@ Y_UNIT_TEST_SUITE(TBtreeIndexTPartLarge) { UNIT_ASSERT_GE(part->Stat.Bytes, 1ull*1024*1024*1024); UNIT_ASSERT_LE(part->Stat.Bytes, 1ull*1024*1024*1024 + 100*1024*1024); - UNIT_ASSERT_VALUES_EQUAL(part->IndexPages.BTreeHistoric[0].LevelsCount, 3); + UNIT_ASSERT_VALUES_EQUAL(part->IndexPages.BTreeHistoric[0].LevelCount, 3); } }