Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions ydb/core/tx/columnshard/columnshard__init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ bool TTxInit::ReadEverything(TTransactionContext& txc, const TActorContext& ctx)
}

{
TMemoryProfileGuard g("TTxInit/LongTxWrites");
auto rowset = db.Table<Schema::LongTxWrites>().Select();
if (!rowset.IsReady()) {
return false;
Expand All @@ -179,13 +180,16 @@ bool TTxInit::ReadEverything(TTransactionContext& txc, const TActorContext& ctx)
}
}

for (const auto& pr : Self->CommitsInFlight) {
ui64 txId = pr.first;
for (TWriteId writeId : pr.second.WriteIds) {
Y_ABORT_UNLESS(Self->LongTxWrites.contains(writeId),
"TTxInit at %" PRIu64 " : Commit %" PRIu64 " references local write %" PRIu64 " that doesn't exist",
Self->TabletID(), txId, writeId);
Self->AddLongTxWrite(writeId, txId);
{
TMemoryProfileGuard g("TTxInit/CommitsInFlight");
for (const auto& pr : Self->CommitsInFlight) {
ui64 txId = pr.first;
for (TWriteId writeId : pr.second.WriteIds) {
Y_ABORT_UNLESS(Self->LongTxWrites.contains(writeId),
"TTxInit at %" PRIu64 " : Commit %" PRIu64 " references local write %" PRIu64 " that doesn't exist",
Self->TabletID(), txId, writeId);
Self->AddLongTxWrite(writeId, txId);
}
}
}
Self->UpdateInsertTableCounters();
Expand Down