@@ -23,7 +23,8 @@ bool TTxWrite::CommitOneBlob(TTransactionContext& txc, const NOlap::TWideSeriali
23
23
auto userData = batch.BuildInsertionUserData (*Self);
24
24
TBlobGroupSelector dsGroupSelector (Self->Info ());
25
25
NOlap::TDbWrapper dbTable (txc.DB , &dsGroupSelector);
26
- NOlap::TCommittedData commitData (userData, Self->GetLastPlannedSnapshot (), Self->Generation (), writeId);
26
+ AFL_VERIFY (CommitSnapshot);
27
+ NOlap::TCommittedData commitData (userData, *CommitSnapshot, Self->Generation (), writeId);
27
28
if (Self->TablesManager .HasTable (userData->GetPathId ())) {
28
29
auto counters = Self->InsertTable ->CommitEphemeral (dbTable, std::move (commitData));
29
30
Self->Counters .GetTabletCounters ()->OnWriteCommitted (counters);
@@ -33,6 +34,7 @@ bool TTxWrite::CommitOneBlob(TTransactionContext& txc, const NOlap::TWideSeriali
33
34
}
34
35
35
36
bool TTxWrite::Execute (TTransactionContext& txc, const TActorContext&) {
37
+ CommitSnapshot = NOlap::TSnapshot::MaxForPlanStep (Self->GetOutdatedStep ());
36
38
TMemoryProfileGuard mpg (" TTxWrite::Execute" );
37
39
NActors::TLogContextGuard logGuard =
38
40
NActors::TLogContextBuilder::Build (NKikimrServices::TX_COLUMNSHARD_BLOBS)(" tablet_id" , Self->TabletID ())(" tx_state" , " execute" );
@@ -160,7 +162,8 @@ void TTxWrite::Complete(const TActorContext& ctx) {
160
162
}
161
163
if (op->GetBehaviour () == EOperationBehaviour::NoTxWrite) {
162
164
Self->OperationsManager ->AddTemporaryTxLink (op->GetLockId ());
163
- Self->OperationsManager ->CommitTransactionOnComplete (*Self, op->GetLockId (), Self->GetLastTxSnapshot ());
165
+ AFL_VERIFY (CommitSnapshot);
166
+ Self->OperationsManager ->CommitTransactionOnComplete (*Self, op->GetLockId (), *CommitSnapshot);
164
167
}
165
168
}
166
169
Self->Counters .GetCSCounters ().OnWriteTxComplete (now - writeMeta.GetWriteStartInstant ());
0 commit comments