@@ -65,8 +65,7 @@ void TDbWrapper::WriteColumn(const NOlap::TPortionInfo& portion, const TColumnRe
65
65
using IndexColumns = NColumnShard::Schema::IndexColumns;
66
66
auto removeSnapshot = portion.GetRemoveSnapshotOptional ();
67
67
db.Table <IndexColumns>()
68
- .Key (0 , 0 , row.ColumnId , portion.GetMinSnapshotDeprecated ().GetPlanStep (), portion.GetMinSnapshotDeprecated ().GetTxId (),
69
- portion.GetPortionId (), row.Chunk )
68
+ .Key (0 , 0 , row.ColumnId , 1 , 1 , portion.GetPortionId (), row.Chunk )
70
69
.Update (NIceDb::TUpdate<IndexColumns::XPlanStep>(removeSnapshot ? removeSnapshot->GetPlanStep () : 0 ),
71
70
NIceDb::TUpdate<IndexColumns::XTxId>(removeSnapshot ? removeSnapshot->GetTxId () : 0 ),
72
71
NIceDb::TUpdate<IndexColumns::Blob>(portion.GetBlobId (row.GetBlobRange ().GetBlobIdxVerified ()).SerializeBinary ()),
@@ -96,7 +95,7 @@ void TDbWrapper::EraseColumn(const NOlap::TPortionInfo& portion, const TColumnRe
96
95
if (AppDataVerified ().ColumnShardConfig .GetColumnChunksV0Usage ()) {
97
96
using IndexColumns = NColumnShard::Schema::IndexColumns;
98
97
db.Table <IndexColumns>()
99
- .Key (0 , 0 , row.ColumnId , portion. GetMinSnapshotDeprecated (). GetPlanStep (), portion. GetMinSnapshotDeprecated (). GetTxId () ,
98
+ .Key (0 , 0 , row.ColumnId , 1 , 1 ,
100
99
portion.GetPortionId (), row.Chunk )
101
100
.Delete ();
102
101
}
@@ -162,8 +161,6 @@ bool TDbWrapper::LoadPortions(const std::optional<TInternalPathId> pathId,
162
161
portion->SetShardingVersion (rowset.template GetValue <IndexPortions::ShardingVersion>());
163
162
}
164
163
portion->SetRemoveSnapshot (rowset.template GetValue <IndexPortions::XPlanStep>(), rowset.template GetValue <IndexPortions::XTxId>());
165
- portion->SetMinSnapshotDeprecated (TSnapshot (
166
- rowset.template GetValue <IndexPortions::MinSnapshotPlanStep>(), rowset.template GetValue <IndexPortions::MinSnapshotTxId>()));
167
164
168
165
NKikimrTxColumnShard::TIndexPortionMeta metaProto;
169
166
const TString metadata = rowset.template GetValue <NColumnShard::Schema::IndexPortions::Metadata>();
@@ -211,8 +208,8 @@ void TDbWrapper::EraseIndex(const TPortionInfo& portion, const TIndexChunk& row)
211
208
db.Table <IndexIndexes>().Key (portion.GetPathId ().GetRawValue (), portion.GetPortionId (), row.GetIndexId (), 0 ).Delete ();
212
209
}
213
210
214
- bool TDbWrapper::LoadIndexes (
215
- const std::optional<TInternalPathId> pathId, const std:: function<void (const TInternalPathId pathId, const ui64 portionId, TIndexChunkLoadContext&&)>& callback) {
211
+ bool TDbWrapper::LoadIndexes (const std::optional<TInternalPathId> pathId,
212
+ const std::function<void (const TInternalPathId pathId, const ui64 portionId, TIndexChunkLoadContext&&)>& callback) {
216
213
NIceDb::TNiceDb db (Database);
217
214
using IndexIndexes = NColumnShard::Schema::IndexIndexes;
218
215
const auto pred = [&](auto & rowset) {
@@ -222,8 +219,8 @@ bool TDbWrapper::LoadIndexes(
222
219
223
220
while (!rowset.EndOfSet ()) {
224
221
NOlap::TIndexChunkLoadContext chunkLoadContext (rowset, DsGroupSelector);
225
- callback (TInternalPathId::FromRawValue (rowset.template GetValue <IndexIndexes::PathId>()), rowset. template GetValue <IndexIndexes::PortionId>(),
226
- std::move (chunkLoadContext));
222
+ callback (TInternalPathId::FromRawValue (rowset.template GetValue <IndexIndexes::PathId>()),
223
+ rowset. template GetValue <IndexIndexes::PortionId>(), std::move (chunkLoadContext));
227
224
228
225
if (!rowset.Next ()) {
229
226
return false ;
@@ -263,8 +260,8 @@ TConclusion<THashMap<TInternalPathId, std::map<NOlap::TSnapshot, TGranuleShardin
263
260
snapshot.DeserializeFromString (rowset.GetValue <Schema::ShardingInfo::Snapshot>()).Validate ();
264
261
NSharding::TGranuleShardingLogicContainer logic;
265
262
logic.DeserializeFromString (rowset.GetValue <Schema::ShardingInfo::Logic>()).Validate ();
266
- TGranuleShardingInfo gShardingInfo (
267
- logic, snapshot, rowset. GetValue <Schema::ShardingInfo::VersionId>(), TInternalPathId::FromRawValue (rowset.GetValue <Schema::ShardingInfo::PathId>()));
263
+ TGranuleShardingInfo gShardingInfo (logic, snapshot, rowset. GetValue <Schema::ShardingInfo::VersionId>(),
264
+ TInternalPathId::FromRawValue (rowset.GetValue <Schema::ShardingInfo::PathId>()));
268
265
AFL_VERIFY (result[gShardingInfo .GetPathId ()].emplace (gShardingInfo .GetSinceSnapshot (), gShardingInfo ).second );
269
266
270
267
if (!rowset.Next ()) {
0 commit comments