Skip to content

Commit 4dac2fa

Browse files
profile memory in transactions (#3816)
1 parent be06910 commit 4dac2fa

File tree

5 files changed

+10
-1
lines changed

5 files changed

+10
-1
lines changed

ydb/core/tx/columnshard/blobs_action/transaction/tx_draft.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace NKikimr::NColumnShard {
44

55
bool TTxWriteDraft::Execute(TTransactionContext& txc, const TActorContext& /*ctx*/) {
6+
TMemoryProfileGuard mpg("TTxWriteDraft::Execute");
67
NOlap::TBlobManagerDb blobManagerDb(txc.DB);
78
for (auto&& action : WriteController->GetBlobActions()) {
89
action.second->OnExecuteTxBeforeWrite(*Self, blobManagerDb);
@@ -11,6 +12,7 @@ bool TTxWriteDraft::Execute(TTransactionContext& txc, const TActorContext& /*ctx
1112
}
1213

1314
void TTxWriteDraft::Complete(const TActorContext& ctx) {
15+
TMemoryProfileGuard mpg("TTxWriteDraft::Complete");
1416
Completed = true;
1517
for (auto&& action : WriteController->GetBlobActions()) {
1618
action.second->OnCompleteTxBeforeWrite(*Self);

ydb/core/tx/columnshard/blobs_action/transaction/tx_gc_indexed.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22

33
namespace NKikimr::NColumnShard {
44
bool TTxGarbageCollectionFinished::Execute(TTransactionContext& txc, const TActorContext& /*ctx*/) {
5+
TMemoryProfileGuard mpg("TTxGarbageCollectionFinished::Execute");
56
AFL_DEBUG(NKikimrServices::TX_COLUMNSHARD)("tx", "TxGarbageCollectionFinished")("event", "execute");
67
NOlap::TBlobManagerDb blobManagerDb(txc.DB);
78
Action->OnExecuteTxAfterCleaning(*Self, blobManagerDb);
89
return true;
910
}
1011
void TTxGarbageCollectionFinished::Complete(const TActorContext& /*ctx*/) {
12+
TMemoryProfileGuard mpg("TTxGarbageCollectionFinished::Complete");
1113
AFL_DEBUG(NKikimrServices::TX_COLUMNSHARD)("tx", "TxGarbageCollectionFinished")("event", "complete");
1214
Action->OnCompleteTxAfterCleaning(*Self, Action);
1315
}

ydb/core/tx/columnshard/blobs_action/transaction/tx_gc_insert_table.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
namespace NKikimr::NColumnShard {
55

66
bool TTxInsertTableCleanup::Execute(TTransactionContext& txc, const TActorContext& /*ctx*/) {
7+
TMemoryProfileGuard mpg("TTxInsertTableCleanup::Execute");
78
TBlobGroupSelector dsGroupSelector(Self->Info());
89
NOlap::TDbWrapper dbTable(txc.DB, &dsGroupSelector);
910
NIceDb::TNiceDb db(txc.DB);
@@ -21,6 +22,7 @@ bool TTxInsertTableCleanup::Execute(TTransactionContext& txc, const TActorContex
2122
return true;
2223
}
2324
void TTxInsertTableCleanup::Complete(const TActorContext& /*ctx*/) {
25+
TMemoryProfileGuard mpg("TTxInsertTableCleanup::Complete");
2426
auto allAborted = Self->InsertTable->GetAborted();
2527
for (auto& [abortedWriteId, abortedData] : allAborted) {
2628
Self->InsertTable->EraseAbortedOnComplete(abortedData);

ydb/core/tx/columnshard/blobs_action/transaction/tx_remove_blobs.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44
namespace NKikimr::NColumnShard {
55

66
bool TTxRemoveSharedBlobs::Execute(TTransactionContext& txc, const TActorContext&) {
7+
TMemoryProfileGuard mpg("TTxRemoveSharedBlobs::Execute");
78
NActors::TLogContextGuard logGuard = NActors::TLogContextBuilder::Build(NKikimrServices::TX_COLUMNSHARD)("tablet_id", Self->TabletID())("tx_state", "execute");
89
NOlap::TBlobManagerDb blobManagerDb(txc.DB);
910
RemoveAction->OnExecuteTxAfterRemoving(*Self, blobManagerDb, true);
1011
return true;
1112
}
1213

1314
void TTxRemoveSharedBlobs::Complete(const TActorContext& ctx) {
15+
TMemoryProfileGuard mpg("TTxRemoveSharedBlobs::Complete");
1416
NActors::TLogContextGuard logGuard = NActors::TLogContextBuilder::Build(NKikimrServices::TX_COLUMNSHARD)("tablet_id", Self->TabletID())("tx_state", "complete");
1517
RemoveAction->OnCompleteTxAfterRemoving(*Self, true);
1618

ydb/core/tx/columnshard/engines/reader/transaction/tx_scan.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ static bool FillPredicatesFromRange(TReadDescription& read, const ::NKikimrTx::T
117117
}
118118

119119
bool TTxScan::Execute(TTransactionContext& /*txc*/, const TActorContext& /*ctx*/) {
120+
TMemoryProfileGuard mpg("TTxScan::Execute");
120121
auto& record = Ev->Get()->Record;
121122
TSnapshot snapshot(record.GetSnapshot().GetStep(), record.GetSnapshot().GetTxId());
122123
const auto scanId = record.GetScanId();
@@ -204,7 +205,7 @@ struct TContainerPrinter {
204205
};
205206

206207
void TTxScan::Complete(const TActorContext& ctx) {
207-
208+
TMemoryProfileGuard mpg("TTxScan::Complete");
208209
auto& request = Ev->Get()->Record;
209210
auto scanComputeActor = Ev->Sender;
210211
const auto& snapshot = request.GetSnapshot();

0 commit comments

Comments
 (0)