summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornsofya <[email protected]>2023-10-04 14:04:24 +0300
committernsofya <[email protected]>2023-10-04 14:56:42 +0300
commit60173424b8ab0a53c93491cd103a06dd5b415f60 (patch)
treecb4e9979eb0c8ec761cbcb0ab8bd41fe27c72e99
parent878390a42ef0ebac95711510159532ecf26b027e (diff)
Add Mutable method
-rw-r--r--ydb/core/tx/columnshard/blobs_action/transaction/tx_write_index.cpp6
-rw-r--r--ydb/core/tx/columnshard/engines/changes/abstract/abstract.h6
-rw-r--r--ydb/core/tx/columnshard/engines/writer/compacted_blob_constructor.cpp2
3 files changed, 9 insertions, 5 deletions
diff --git a/ydb/core/tx/columnshard/blobs_action/transaction/tx_write_index.cpp b/ydb/core/tx/columnshard/blobs_action/transaction/tx_write_index.cpp
index b9ceac5f886..8ab7fedda1b 100644
--- a/ydb/core/tx/columnshard/blobs_action/transaction/tx_write_index.cpp
+++ b/ydb/core/tx/columnshard/blobs_action/transaction/tx_write_index.cpp
@@ -23,13 +23,13 @@ bool TTxWriteIndex::Execute(TTransactionContext& txc, const TActorContext& ctx)
NOlap::TWriteIndexContext context(txc, dbWrap);
changes->WriteIndex(*Self, context);
- changes->GetBlobsAction().OnExecuteTxAfterAction(*Self, *context.BlobManagerDb, true);
+ changes->MutableBlobsAction().OnExecuteTxAfterAction(*Self, *context.BlobManagerDb, true);
Self->UpdateIndexCounters();
} else {
TBlobGroupSelector dsGroupSelector(Self->Info());
NColumnShard::TBlobManagerDb blobsDb(txc.DB);
- changes->GetBlobsAction().OnExecuteTxAfterAction(*Self, blobsDb, false);
+ changes->MutableBlobsAction().OnExecuteTxAfterAction(*Self, blobsDb, false);
for (ui32 i = 0; i < changes->GetWritePortionsCount(); ++i) {
for (auto&& i : changes->GetWritePortionInfo(i)->GetPortionInfo().Records) {
LOG_S_WARN(TxPrefix() << "(" << changes->TypeString() << ":" << i.BlobRange << ") blob cannot apply changes: " << TxSuffix());
@@ -65,7 +65,7 @@ void TTxWriteIndex::Complete(const TActorContext& ctx) {
}
Self->UpdateResourceMetrics(ctx, Ev->Get()->PutResult->GetResourceUsage());
- changes->GetBlobsAction().OnCompleteTxAfterAction(*Self);
+ changes->MutableBlobsAction().OnCompleteTxAfterAction(*Self);
NYDBTest::TControllers::GetColumnShardController()->OnWriteIndexComplete(Self->TabletID(), changes->TypeString());
}
diff --git a/ydb/core/tx/columnshard/engines/changes/abstract/abstract.h b/ydb/core/tx/columnshard/engines/changes/abstract/abstract.h
index cea84b06faf..49c0cda5639 100644
--- a/ydb/core/tx/columnshard/engines/changes/abstract/abstract.h
+++ b/ydb/core/tx/columnshard/engines/changes/abstract/abstract.h
@@ -178,7 +178,11 @@ public:
return TaskIdentifier;
}
- TBlobsAction& GetBlobsAction() {
+ TBlobsAction& MutableBlobsAction() {
+ return BlobsAction;
+ }
+
+ const TBlobsAction& GetBlobsAction() const {
return BlobsAction;
}
diff --git a/ydb/core/tx/columnshard/engines/writer/compacted_blob_constructor.cpp b/ydb/core/tx/columnshard/engines/writer/compacted_blob_constructor.cpp
index 6af7650f125..752afbb8b24 100644
--- a/ydb/core/tx/columnshard/engines/writer/compacted_blob_constructor.cpp
+++ b/ydb/core/tx/columnshard/engines/writer/compacted_blob_constructor.cpp
@@ -18,7 +18,7 @@ TCompactedWriteController::TCompactedWriteController(const TActorId& dstActor, T
auto* pInfo = changes.GetWritePortionInfo(i);
Y_VERIFY(pInfo);
TPortionInfoWithBlobs& portionWithBlobs = *pInfo;
- auto action = changes.GetBlobsAction().GetWriting(portionWithBlobs.GetPortionInfo());
+ auto action = changes.MutableBlobsAction().GetWriting(portionWithBlobs.GetPortionInfo());
for (auto&& b : portionWithBlobs.GetBlobs()) {
auto& task = AddWriteTask(TBlobWriteInfo::BuildWriteTask(b.GetBlob(), action));
b.RegisterBlobId(portionWithBlobs, task.GetBlobId());