Skip to content

Commit 27420cd

Browse files
authored
TRowVersion -> TSnapshot (#921)
1 parent e75b8c5 commit 27420cd

9 files changed

+71
-74
lines changed

ydb/core/tx/columnshard/columnshard.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ ui64 TColumnShard::MemoryUsage() const {
258258
CommitsInFlight.size() * sizeof(TCommitMeta) +
259259
LongTxWrites.size() * (sizeof(TWriteId) + sizeof(TLongTxWriteInfo)) +
260260
LongTxWritesByUniqueId.size() * (sizeof(TULID) + sizeof(void*)) +
261-
(WaitingReads.size() + WaitingScans.size()) * (sizeof(TRowVersion) + sizeof(void*)) +
261+
(WaitingReads.size() + WaitingScans.size()) * (sizeof(NOlap::TSnapshot) + sizeof(void*)) +
262262
TabletCounters->Simple()[COUNTER_PREPARED_RECORDS].Get() * sizeof(NOlap::TInsertedData) +
263263
TabletCounters->Simple()[COUNTER_COMMITTED_RECORDS].Get() * sizeof(NOlap::TInsertedData);
264264
memory += TablesManager.GetMemoryUsage();

ydb/core/tx/columnshard/columnshard__progress_tx.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class TColumnShard::TTxProgressTx : public TTransactionBase<TColumnShard> {
8686
case NKikimrTxColumnShard::TX_KIND_SCHEMA:
8787
{
8888
auto& meta = Self->AltersInFlight.at(txId);
89-
Self->RunSchemaTx(meta.Body, TRowVersion(step, txId), txc);
89+
Self->RunSchemaTx(meta.Body, NOlap::TSnapshot(step, txId), txc);
9090
Self->ProtectSchemaSeqNo(meta.Body.GetSeqNo(), txc);
9191
for (TActorId subscriber : meta.NotifySubscribers) {
9292
TxEvents.emplace_back(subscriber, 0,

ydb/core/tx/columnshard/columnshard__read.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,13 @@ void TColumnShard::Handle(TEvColumnShard::TEvRead::TPtr& ev, const TActorContext
149149
LastAccessTime = TAppData::TimeProvider->Now();
150150

151151
const auto* msg = ev->Get();
152-
TRowVersion readVersion(msg->Record.GetPlanStep(), msg->Record.GetTxId());
153-
TRowVersion maxReadVersion = GetMaxReadVersion();
152+
NOlap::TSnapshot readVersion(msg->Record.GetPlanStep(), msg->Record.GetTxId());
153+
NOlap::TSnapshot maxReadVersion = GetMaxReadVersion();
154154
LOG_S_DEBUG("Read at tablet " << TabletID() << " version=" << readVersion << " readable=" << maxReadVersion);
155155

156156
if (maxReadVersion < readVersion) {
157157
WaitingReads.emplace(readVersion, std::move(ev));
158-
WaitPlanStep(readVersion.Step);
158+
WaitPlanStep(readVersion.GetPlanStep());
159159
return;
160160
}
161161

ydb/core/tx/columnshard/columnshard__scan.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -878,8 +878,8 @@ void TColumnShard::Handle(TEvColumnShard::TEvScan::TPtr& ev, const TActorContext
878878
const auto& scanId = record.GetScanId();
879879
const auto& snapshot = record.GetSnapshot();
880880

881-
TRowVersion readVersion(snapshot.GetStep(), snapshot.GetTxId());
882-
TRowVersion maxReadVersion = GetMaxReadVersion();
881+
NOlap::TSnapshot readVersion(snapshot.GetStep(), snapshot.GetTxId());
882+
NOlap::TSnapshot maxReadVersion = GetMaxReadVersion();
883883

884884
LOG_S_DEBUG("EvScan txId: " << txId
885885
<< " scanId: " << scanId
@@ -889,7 +889,7 @@ void TColumnShard::Handle(TEvColumnShard::TEvScan::TPtr& ev, const TActorContext
889889

890890
if (maxReadVersion < readVersion) {
891891
WaitingScans.emplace(readVersion, std::move(ev));
892-
WaitPlanStep(readVersion.Step);
892+
WaitPlanStep(readVersion.GetPlanStep());
893893
return;
894894
}
895895

ydb/core/tx/columnshard/columnshard_impl.cpp

+13-12
Original file line numberDiff line numberDiff line change
@@ -256,18 +256,18 @@ void TColumnShard::SendWaitPlanStep(ui64 step) {
256256

257257
void TColumnShard::RescheduleWaitingReads() {
258258
ui64 minWaitingStep = Max<ui64>();
259-
TRowVersion maxReadVersion = GetMaxReadVersion();
259+
NOlap::TSnapshot maxReadVersion = GetMaxReadVersion();
260260
for (auto it = WaitingReads.begin(); it != WaitingReads.end();) {
261261
if (maxReadVersion < it->first) {
262-
minWaitingStep = Min(minWaitingStep, it->first.Step);
262+
minWaitingStep = Min(minWaitingStep, it->first.GetPlanStep());
263263
break;
264264
}
265265
TActivationContext::Send(it->second.Release());
266266
it = WaitingReads.erase(it);
267267
}
268268
for (auto it = WaitingScans.begin(); it != WaitingScans.end();) {
269269
if (maxReadVersion < it->first) {
270-
minWaitingStep = Min(minWaitingStep, it->first.Step);
270+
minWaitingStep = Min(minWaitingStep, it->first.GetPlanStep());
271271
break;
272272
}
273273
TActivationContext::Send(it->second.Release());
@@ -278,18 +278,19 @@ void TColumnShard::RescheduleWaitingReads() {
278278
}
279279
}
280280

281-
TRowVersion TColumnShard::GetMaxReadVersion() const {
281+
NOlap::TSnapshot TColumnShard::GetMaxReadVersion() const {
282282
auto plannedTx = ProgressTxController->GetPlannedTx();
283283
if (plannedTx) {
284284
// We may only read just before the first transaction in the queue
285-
return TRowVersion(plannedTx->Step, plannedTx->TxId).Prev();
285+
auto maxReadVersion = TRowVersion(plannedTx->Step, plannedTx->TxId).Prev();
286+
return NOlap::TSnapshot(maxReadVersion.Step, maxReadVersion.TxId);
286287
}
287288
ui64 step = LastPlannedStep;
288289
if (MediatorTimeCastEntry) {
289290
ui64 mediatorStep = MediatorTimeCastEntry->Get(TabletID());
290291
step = Max(step, mediatorStep);
291292
}
292-
return TRowVersion(step, Max<ui64>());
293+
return NOlap::TSnapshot(step, Max<ui64>());
293294
}
294295

295296
ui64 TColumnShard::GetOutdatedStep() const {
@@ -450,7 +451,7 @@ void TColumnShard::ProtectSchemaSeqNo(const NKikimrTxColumnShard::TSchemaSeqNo&
450451
}
451452
}
452453

453-
void TColumnShard::RunSchemaTx(const NKikimrTxColumnShard::TSchemaTxBody& body, const TRowVersion& version,
454+
void TColumnShard::RunSchemaTx(const NKikimrTxColumnShard::TSchemaTxBody& body, const NOlap::TSnapshot& version,
454455
NTabletFlatExecutor::TTransactionContext& txc) {
455456
switch (body.TxBody_case()) {
456457
case NKikimrTxColumnShard::TSchemaTxBody::kInitShard: {
@@ -483,7 +484,7 @@ void TColumnShard::RunSchemaTx(const NKikimrTxColumnShard::TSchemaTxBody& body,
483484
Y_ABORT("Unsupported schema tx type");
484485
}
485486

486-
void TColumnShard::RunInit(const NKikimrTxColumnShard::TInitShard& proto, const TRowVersion& version,
487+
void TColumnShard::RunInit(const NKikimrTxColumnShard::TInitShard& proto, const NOlap::TSnapshot& version,
487488
NTabletFlatExecutor::TTransactionContext& txc) {
488489
Y_UNUSED(version);
489490

@@ -504,7 +505,7 @@ void TColumnShard::RunInit(const NKikimrTxColumnShard::TInitShard& proto, const
504505
}
505506
}
506507

507-
void TColumnShard::RunEnsureTable(const NKikimrTxColumnShard::TCreateTable& tableProto, const TRowVersion& version,
508+
void TColumnShard::RunEnsureTable(const NKikimrTxColumnShard::TCreateTable& tableProto, const NOlap::TSnapshot& version,
508509
NTabletFlatExecutor::TTransactionContext& txc) {
509510
NIceDb::TNiceDb db(txc.DB);
510511

@@ -560,7 +561,7 @@ void TColumnShard::RunEnsureTable(const NKikimrTxColumnShard::TCreateTable& tabl
560561
SetCounter(COUNTER_TABLE_TTLS, TablesManager.GetTtl().PathsCount());
561562
}
562563

563-
void TColumnShard::RunAlterTable(const NKikimrTxColumnShard::TAlterTable& alterProto, const TRowVersion& version,
564+
void TColumnShard::RunAlterTable(const NKikimrTxColumnShard::TAlterTable& alterProto, const NOlap::TSnapshot& version,
564565
NTabletFlatExecutor::TTransactionContext& txc) {
565566
NIceDb::TNiceDb db(txc.DB);
566567

@@ -593,7 +594,7 @@ void TColumnShard::RunAlterTable(const NKikimrTxColumnShard::TAlterTable& alterP
593594
TablesManager.AddTableVersion(pathId, version, tableVerProto, db);
594595
}
595596

596-
void TColumnShard::RunDropTable(const NKikimrTxColumnShard::TDropTable& dropProto, const TRowVersion& version,
597+
void TColumnShard::RunDropTable(const NKikimrTxColumnShard::TDropTable& dropProto, const NOlap::TSnapshot& version,
597598
NTabletFlatExecutor::TTransactionContext& txc) {
598599
NIceDb::TNiceDb db(txc.DB);
599600

@@ -614,7 +615,7 @@ void TColumnShard::RunDropTable(const NKikimrTxColumnShard::TDropTable& dropProt
614615
TryAbortWrites(db, dbTable, std::move(writesToAbort));
615616
}
616617

617-
void TColumnShard::RunAlterStore(const NKikimrTxColumnShard::TAlterStore& proto, const TRowVersion& version,
618+
void TColumnShard::RunAlterStore(const NKikimrTxColumnShard::TAlterStore& proto, const NOlap::TSnapshot& version,
618619
NTabletFlatExecutor::TTransactionContext& txc) {
619620
NIceDb::TNiceDb db(txc.DB);
620621

ydb/core/tx/columnshard/columnshard_impl.h

+9-10
Original file line numberDiff line numberDiff line change
@@ -428,8 +428,8 @@ class TColumnShard
428428
THashMap<TWriteId, TLongTxWriteInfo> LongTxWrites;
429429
using TPartsForLTXShard = THashMap<ui32, TLongTxWriteInfo*>;
430430
THashMap<TULID, TPartsForLTXShard> LongTxWritesByUniqueId;
431-
TMultiMap<TRowVersion, TEvColumnShard::TEvRead::TPtr> WaitingReads;
432-
TMultiMap<TRowVersion, TEvColumnShard::TEvScan::TPtr> WaitingScans;
431+
TMultiMap<NOlap::TSnapshot, TEvColumnShard::TEvRead::TPtr> WaitingReads;
432+
TMultiMap<NOlap::TSnapshot, TEvColumnShard::TEvScan::TPtr> WaitingScans;
433433
TBackgroundController BackgroundController;
434434
TSettings Settings;
435435
TLimits Limits;
@@ -442,7 +442,7 @@ class TColumnShard
442442
bool WaitPlanStep(ui64 step);
443443
void SendWaitPlanStep(ui64 step);
444444
void RescheduleWaitingReads();
445-
TRowVersion GetMaxReadVersion() const;
445+
NOlap::TSnapshot GetMaxReadVersion() const;
446446
ui64 GetMinReadStep() const;
447447
ui64 GetOutdatedStep() const;
448448

@@ -465,12 +465,12 @@ class TColumnShard
465465
void UpdateSchemaSeqNo(const TMessageSeqNo& seqNo, NTabletFlatExecutor::TTransactionContext& txc);
466466
void ProtectSchemaSeqNo(const NKikimrTxColumnShard::TSchemaSeqNo& seqNoProto, NTabletFlatExecutor::TTransactionContext& txc);
467467

468-
void RunSchemaTx(const NKikimrTxColumnShard::TSchemaTxBody& body, const TRowVersion& version, NTabletFlatExecutor::TTransactionContext& txc);
469-
void RunInit(const NKikimrTxColumnShard::TInitShard& body, const TRowVersion& version, NTabletFlatExecutor::TTransactionContext& txc);
470-
void RunEnsureTable(const NKikimrTxColumnShard::TCreateTable& body, const TRowVersion& version, NTabletFlatExecutor::TTransactionContext& txc);
471-
void RunAlterTable(const NKikimrTxColumnShard::TAlterTable& body, const TRowVersion& version, NTabletFlatExecutor::TTransactionContext& txc);
472-
void RunDropTable(const NKikimrTxColumnShard::TDropTable& body, const TRowVersion& version, NTabletFlatExecutor::TTransactionContext& txc);
473-
void RunAlterStore(const NKikimrTxColumnShard::TAlterStore& body, const TRowVersion& version, NTabletFlatExecutor::TTransactionContext& txc);
468+
void RunSchemaTx(const NKikimrTxColumnShard::TSchemaTxBody& body, const NOlap::TSnapshot& version, NTabletFlatExecutor::TTransactionContext& txc);
469+
void RunInit(const NKikimrTxColumnShard::TInitShard& body, const NOlap::TSnapshot& version, NTabletFlatExecutor::TTransactionContext& txc);
470+
void RunEnsureTable(const NKikimrTxColumnShard::TCreateTable& body, const NOlap::TSnapshot& version, NTabletFlatExecutor::TTransactionContext& txc);
471+
void RunAlterTable(const NKikimrTxColumnShard::TAlterTable& body, const NOlap::TSnapshot& version, NTabletFlatExecutor::TTransactionContext& txc);
472+
void RunDropTable(const NKikimrTxColumnShard::TDropTable& body, const NOlap::TSnapshot& version, NTabletFlatExecutor::TTransactionContext& txc);
473+
void RunAlterStore(const NKikimrTxColumnShard::TAlterStore& body, const NOlap::TSnapshot& version, NTabletFlatExecutor::TTransactionContext& txc);
474474

475475
void StartIndexTask(std::vector<const NOlap::TInsertedData*>&& dataToIndex, const i64 bytesToIndex);
476476
void SetupIndexation();
@@ -493,7 +493,6 @@ class TColumnShard
493493

494494
static TDuration GetControllerPeriodicWakeupActivationPeriod();
495495
static TDuration GetControllerStatsReportInterval();
496-
497496
public:
498497
const std::shared_ptr<NOlap::IStoragesManager>& GetStoragesManager() const {
499498
return StoragesManager;

ydb/core/tx/columnshard/columnshard_schema.h

+11-11
Original file line numberDiff line numberDiff line change
@@ -392,23 +392,23 @@ struct Schema : NIceDb::Schema {
392392

393393
static void SaveSchemaPresetVersionInfo(
394394
NIceDb::TNiceDb& db,
395-
ui64 id, const TRowVersion& version,
395+
ui64 id, const NOlap::TSnapshot& version,
396396
const NKikimrTxColumnShard::TSchemaPresetVersionInfo& info)
397397
{
398398
TString serialized;
399399
Y_ABORT_UNLESS(info.SerializeToString(&serialized));
400-
db.Table<SchemaPresetVersionInfo>().Key(id, version.Step, version.TxId).Update(
400+
db.Table<SchemaPresetVersionInfo>().Key(id, version.GetPlanStep(), version.GetTxId()).Update(
401401
NIceDb::TUpdate<SchemaPresetVersionInfo::InfoProto>(serialized));
402402
}
403403

404-
static void SaveSchemaPresetDropVersion(NIceDb::TNiceDb& db, ui64 id, const TRowVersion& dropVersion) {
404+
static void SaveSchemaPresetDropVersion(NIceDb::TNiceDb& db, ui64 id, const NOlap::TSnapshot& dropVersion) {
405405
db.Table<SchemaPresetInfo>().Key(id).Update(
406-
NIceDb::TUpdate<SchemaPresetInfo::DropStep>(dropVersion.Step),
407-
NIceDb::TUpdate<SchemaPresetInfo::DropTxId>(dropVersion.TxId));
406+
NIceDb::TUpdate<SchemaPresetInfo::DropStep>(dropVersion.GetPlanStep()),
407+
NIceDb::TUpdate<SchemaPresetInfo::DropTxId>(dropVersion.GetTxId()));
408408
}
409409

410-
static void EraseSchemaPresetVersionInfo(NIceDb::TNiceDb& db, ui64 id, const TRowVersion& version) {
411-
db.Table<SchemaPresetVersionInfo>().Key(id, version.Step, version.TxId).Delete();
410+
static void EraseSchemaPresetVersionInfo(NIceDb::TNiceDb& db, ui64 id, const NOlap::TSnapshot& version) {
411+
db.Table<SchemaPresetVersionInfo>().Key(id, version.GetPlanStep(), version.GetTxId()).Delete();
412412
}
413413

414414
static void EraseSchemaPresetInfo(NIceDb::TNiceDb& db, ui64 id) {
@@ -424,12 +424,12 @@ struct Schema : NIceDb::Schema {
424424

425425
static void SaveTableVersionInfo(
426426
NIceDb::TNiceDb& db,
427-
ui64 pathId, const TRowVersion& version,
427+
ui64 pathId, const NOlap::TSnapshot& version,
428428
const NKikimrTxColumnShard::TTableVersionInfo& info)
429429
{
430430
TString serialized;
431431
Y_ABORT_UNLESS(info.SerializeToString(&serialized));
432-
db.Table<TableVersionInfo>().Key(pathId, version.Step, version.TxId).Update(
432+
db.Table<TableVersionInfo>().Key(pathId, version.GetPlanStep(), version.GetTxId()).Update(
433433
NIceDb::TUpdate<TableVersionInfo::InfoProto>(serialized));
434434
}
435435

@@ -441,8 +441,8 @@ struct Schema : NIceDb::Schema {
441441
NIceDb::TUpdate<TableInfo::DropTxId>(dropTxId));
442442
}
443443

444-
static void EraseTableVersionInfo(NIceDb::TNiceDb& db, ui64 pathId, const TRowVersion& version) {
445-
db.Table<TableVersionInfo>().Key(pathId, version.Step, version.TxId).Delete();
444+
static void EraseTableVersionInfo(NIceDb::TNiceDb& db, ui64 pathId, const NOlap::TSnapshot& version) {
445+
db.Table<TableVersionInfo>().Key(pathId, version.GetPlanStep(), version.GetTxId()).Delete();
446446
}
447447

448448
static void EraseTableInfo(NIceDb::TNiceDb& db, ui64 pathId) {

ydb/core/tx/columnshard/tables_manager.cpp

+16-16
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ bool TTablesManager::InitFromDB(NIceDb::TNiceDb& db) {
9595
return false;
9696
}
9797

98-
THashMap<ui64, TRowVersion> lastVersion;
98+
THashMap<ui64, NOlap::TSnapshot> lastVersion;
9999
while (!rowset.EndOfSet()) {
100100
const ui64 pathId = rowset.GetValue<Schema::TableVersionInfo::PathId>();
101101
Y_ABORT_UNLESS(Tables.contains(pathId));
102-
TRowVersion version(
102+
NOlap::TSnapshot version(
103103
rowset.GetValue<Schema::TableVersionInfo::SinceStep>(),
104-
rowset.GetValue<Schema::TableVersionInfo::SinceTxId>());
104+
rowset.GetValue<Schema::TableVersionInfo::SinceTxId>());
105105

106106
auto& table = Tables.at(pathId);
107107
TTableInfo::TTableVersionInfo versionInfo;
@@ -112,10 +112,11 @@ bool TTablesManager::InitFromDB(NIceDb::TNiceDb& db) {
112112
if (!table.IsDropped()) {
113113
auto& ttlSettings = versionInfo.GetTtlSettings();
114114
if (ttlSettings.HasEnabled()) {
115-
if (!lastVersion.contains(pathId) || lastVersion[pathId] < version) {
115+
auto vIt = lastVersion.find(pathId);
116+
if (vIt == lastVersion.end() || vIt->second < version) {
116117
TTtl::TDescription description(ttlSettings.GetEnabled());
117118
Ttl.SetPathTtl(pathId, std::move(description));
118-
lastVersion[pathId] = version;
119+
lastVersion.emplace(pathId, version);
119120
}
120121
}
121122
}
@@ -136,7 +137,7 @@ bool TTablesManager::InitFromDB(NIceDb::TNiceDb& db) {
136137
const ui32 id = rowset.GetValue<Schema::SchemaPresetVersionInfo::Id>();
137138
Y_ABORT_UNLESS(SchemaPresets.contains(id));
138139
auto& preset = SchemaPresets.at(id);
139-
TRowVersion version(
140+
NOlap::TSnapshot version(
140141
rowset.GetValue<Schema::SchemaPresetVersionInfo::SinceStep>(),
141142
rowset.GetValue<Schema::SchemaPresetVersionInfo::SinceTxId>());
142143

@@ -208,18 +209,18 @@ ui64 TTablesManager::GetMemoryUsage() const {
208209
return memory;
209210
}
210211

211-
void TTablesManager::DropTable(const ui64 pathId, const TRowVersion& version, NIceDb::TNiceDb& db) {
212+
void TTablesManager::DropTable(const ui64 pathId, const NOlap::TSnapshot& version, NIceDb::TNiceDb& db) {
212213
auto& table = Tables.at(pathId);
213214
table.SetDropVersion(version);
214215
PathsToDrop.insert(pathId);
215216
Ttl.DropPathTtl(pathId);
216217
if (PrimaryIndex) {
217218
PrimaryIndex->OnTieringModified(nullptr, Ttl);
218219
}
219-
Schema::SaveTableDropVersion(db, pathId, version.Step, version.TxId);
220+
Schema::SaveTableDropVersion(db, pathId, version.GetPlanStep(), version.GetTxId());
220221
}
221222

222-
void TTablesManager::DropPreset(const ui32 presetId, const TRowVersion& version, NIceDb::TNiceDb& db) {
223+
void TTablesManager::DropPreset(const ui32 presetId, const NOlap::TSnapshot& version, NIceDb::TNiceDb& db) {
223224
auto& preset = SchemaPresets.at(presetId);
224225
Y_ABORT_UNLESS(preset.GetName() != "default", "Cannot drop the default preset");
225226
preset.SetDropVersion(version);
@@ -247,14 +248,14 @@ bool TTablesManager::RegisterSchemaPreset(const TSchemaPreset& schemaPreset, NIc
247248
return true;
248249
}
249250

250-
void TTablesManager::AddSchemaVersion(const ui32 presetId, const TRowVersion& version, const NKikimrSchemeOp::TColumnTableSchema& schema, NIceDb::TNiceDb& db) {
251+
void TTablesManager::AddSchemaVersion(const ui32 presetId, const NOlap::TSnapshot& version, const NKikimrSchemeOp::TColumnTableSchema& schema, NIceDb::TNiceDb& db) {
251252
Y_ABORT_UNLESS(SchemaPresets.contains(presetId));
252253
auto preset = SchemaPresets.at(presetId);
253254

254255
TSchemaPreset::TSchemaPresetVersionInfo versionInfo;
255256
versionInfo.SetId(presetId);
256-
versionInfo.SetSinceStep(version.Step);
257-
versionInfo.SetSinceTxId(version.TxId);
257+
versionInfo.SetSinceStep(version.GetPlanStep());
258+
versionInfo.SetSinceTxId(version.GetTxId());
258259
*versionInfo.MutableSchema() = schema;
259260

260261
auto& schemaPreset = SchemaPresets.at(presetId);
@@ -268,7 +269,7 @@ void TTablesManager::AddSchemaVersion(const ui32 presetId, const TRowVersion& ve
268269
}
269270
}
270271

271-
void TTablesManager::AddTableVersion(const ui64 pathId, const TRowVersion& version, const TTableInfo::TTableVersionInfo& versionInfo, NIceDb::TNiceDb& db) {
272+
void TTablesManager::AddTableVersion(const ui64 pathId, const NOlap::TSnapshot& version, const TTableInfo::TTableVersionInfo& versionInfo, NIceDb::TNiceDb& db) {
272273
auto& table = Tables.at(pathId);
273274

274275
if (versionInfo.HasSchemaPresetId()) {
@@ -300,8 +301,7 @@ void TTablesManager::AddTableVersion(const ui64 pathId, const TRowVersion& versi
300301
table.AddVersion(version, versionInfo);
301302
}
302303

303-
void TTablesManager::IndexSchemaVersion(const TRowVersion& version, const NKikimrSchemeOp::TColumnTableSchema& schema) {
304-
NOlap::TSnapshot snapshot{version.Step, version.TxId};
304+
void TTablesManager::IndexSchemaVersion(const NOlap::TSnapshot& snapshot, const NKikimrSchemeOp::TColumnTableSchema& schema) {
305305
NOlap::TIndexInfo indexInfo = DeserializeIndexInfoFromProto(schema);
306306
indexInfo.SetAllKeys();
307307
const bool isFirstPrimaryIndexInitialization = !PrimaryIndex;
@@ -341,7 +341,7 @@ bool TTablesManager::TryFinalizeDropPath(NTabletFlatExecutor::TTransactionContex
341341
NIceDb::TNiceDb db(txc.DB);
342342
NColumnShard::Schema::EraseTableInfo(db, pathId);
343343
const auto& table = Tables.find(pathId);
344-
Y_ABORT_UNLESS(table != Tables.end(), "No schema for path %lu", pathId);
344+
Y_ABORT_UNLESS(table != Tables.end(), "No schema for path %lu", pathId);
345345
for (auto&& tableVersion : table->second.GetVersions()) {
346346
NColumnShard::Schema::EraseTableVersionInfo(db, pathId, tableVersion.first);
347347
}

0 commit comments

Comments
 (0)