Skip to content

Commit

Permalink
additional memory monitoring (ydb-platform#798)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanmorozov333 authored Dec 29, 2023
1 parent cbdd149 commit c288b66
Showing 1 changed file with 11 additions and 7 deletions.
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

0 comments on commit c288b66

Please sign in to comment.