@@ -61,8 +61,7 @@ namespace NTable {
61
61
TIntrusiveConstPtr<NPage::TBloom> ByKey;
62
62
TIntrusiveConstPtr<NPage::TFrames> Large;
63
63
TIntrusiveConstPtr<NPage::TFrames> Small;
64
- TVector<TSharedData> GroupIndexes;
65
- TVector<TSharedData> HistoricIndexes;
64
+ size_t IndexesRawSize;
66
65
TRowVersion MinRowVersion;
67
66
TRowVersion MaxRowVersion;
68
67
TIntrusiveConstPtr<NPage::TGarbageStats> GarbageStats;
@@ -87,29 +86,19 @@ namespace NTable {
87
86
, Small(std::move(params.Small))
88
87
, IndexPages(std::move(params.IndexPages))
89
88
, Index(std::move(params.Index))
90
- , GroupIndexes(
91
- std::make_move_iterator (params.GroupIndexes.begin()),
92
- std::make_move_iterator(params.GroupIndexes.end()))
93
- , HistoricIndexes(
94
- std::make_move_iterator (params.HistoricIndexes.begin()),
95
- std::make_move_iterator(params.HistoricIndexes.end()))
96
89
, ByKey(std::move(params.ByKey))
97
90
, GarbageStats(std::move(params.GarbageStats))
98
91
, TxIdStats(std::move(params.TxIdStats))
99
92
, Stat(stat)
100
93
, GroupsCount(IndexPages.Groups.size())
101
94
, HistoricGroupsCount(IndexPages.Historic.size())
102
- , IndexesRawSize(Index.RawSize() + SumRawSize(GroupIndexes) )
95
+ , IndexesRawSize(params.IndexesRawSize )
103
96
, MinRowVersion(params.MinRowVersion)
104
97
, MaxRowVersion(params.MaxRowVersion)
105
98
{
106
99
Y_VERIFY (Scheme->Groups .size () == GroupsCount,
107
100
" Part has scheme with %" PRISZT " groups, but %" PRISZT " indexes" ,
108
101
Scheme->Groups .size (), GroupsCount);
109
- Y_VERIFY (HistoricIndexes.empty () || HistoricIndexes.size () == GroupsCount,
110
- " Part has %" PRISZT " indexes, but %" PRISZT " historic indexes" ,
111
- GroupsCount, HistoricIndexes.size ());
112
-
113
102
Y_VERIFY (!HistoricGroupsCount || HistoricGroupsCount == GroupsCount,
114
103
" Part has %" PRISZT " indexes, but %" PRISZT " historic indexes" ,
115
104
GroupsCount, HistoricGroupsCount);
@@ -141,24 +130,6 @@ namespace NTable {
141
130
virtual ui8 GetPageChannel (NPage::TPageId id, NPage::TGroupId groupId = { }) const = 0;
142
131
virtual ui8 GetPageChannel (ELargeObj lob, ui64 ref) const = 0;
143
132
144
- const NPage::TIndex& GetGroupIndex (NPage::TGroupId groupId) const noexcept {
145
- if (!groupId.Historic ) {
146
- if (groupId.Index == 0 ) {
147
- return Index;
148
- } else {
149
- Y_VERIFY (groupId.Index <= GroupIndexes.size (),
150
- " Group index %" PRIu32 " is missing" ,
151
- groupId.Index );
152
- return GroupIndexes[groupId.Index - 1 ];
153
- }
154
- } else {
155
- Y_VERIFY (groupId.Index < HistoricIndexes.size (),
156
- " Historic index %" PRIu32 " is missing" ,
157
- groupId.Index );
158
- return HistoricIndexes[groupId.Index ];
159
- }
160
- }
161
-
162
133
protected:
163
134
// Helper for CloneWithEpoch
164
135
TPart (const TPart& src, TEpoch epoch)
@@ -170,8 +141,6 @@ namespace NTable {
170
141
, Small(src.Small)
171
142
, IndexPages(src.IndexPages)
172
143
, Index(src.Index)
173
- , GroupIndexes(src.GroupIndexes)
174
- , HistoricIndexes(src.HistoricIndexes)
175
144
, ByKey(src.ByKey)
176
145
, GarbageStats(src.GarbageStats)
177
146
, Stat(src.Stat)
@@ -182,15 +151,6 @@ namespace NTable {
182
151
, MaxRowVersion(src.MaxRowVersion)
183
152
{ }
184
153
185
- private:
186
- static size_t SumRawSize (const TVector<NPage::TIndex>& indexes) {
187
- size_t ret = 0 ;
188
- for (auto & index : indexes) {
189
- ret += index .RawSize ();
190
- }
191
- return ret;
192
- }
193
-
194
154
public:
195
155
const TLogoBlobID Label;
196
156
const TEpoch Epoch;
@@ -200,8 +160,6 @@ namespace NTable {
200
160
const TIntrusiveConstPtr<NPage::TFrames> Small;
201
161
const TIndexPages IndexPages;
202
162
const NPage::TIndex Index;
203
- const TVector<NPage::TIndex> GroupIndexes;
204
- const TVector<NPage::TIndex> HistoricIndexes;
205
163
const TIntrusiveConstPtr<NPage::TBloom> ByKey;
206
164
const TIntrusiveConstPtr<NPage::TGarbageStats> GarbageStats;
207
165
const TIntrusiveConstPtr<NPage::TTxIdStatsPage> TxIdStats;
0 commit comments