Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanmorozov333 committed Jan 24, 2025
1 parent 86ce07b commit c279abb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ydb/core/tx/columnshard/columnshard__write.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ void TColumnShard::Handle(NPrivateEvents::NWrite::TEvWritePortionResult::TPtr& e
for (auto&& i : writtenData.GetWriteResults()) {
AFL_DEBUG(NKikimrServices::TX_COLUMNSHARD_WRITE)("writing_size", i.GetDataSize())("event", "data_write_finished")(
"writing_id", i.GetWriteMeta().GetId());
i.MutableWriteMeta().OnStage(NEvWrite::EWriteStage::Finished);
Counters.OnWritePutBlobsSuccess(now - i.GetWriteMeta().GetWriteStartInstant(), i.GetRecordsCount());
Counters.GetWritesMonitor()->OnFinishWrite(i.GetDataSize(), 1);
}
Expand All @@ -111,6 +112,7 @@ void TColumnShard::Handle(NPrivateEvents::NWrite::TEvWritePortionResult::TPtr& e
AFL_WARN(NKikimrServices::TX_COLUMNSHARD_WRITE)("writing_size", i.GetDataSize())("event", "data_write_error")(
"writing_id", i.GetWriteMeta().GetId());
Counters.GetWritesMonitor()->OnFinishWrite(i.GetDataSize(), 1);
i.MutableWriteMeta().OnStage(NEvWrite::EWriteStage::Finished);
}

Execute(new TTxBlobsWritingFailed(this, ev->Get()->GetWriteStatus(), std::move(writtenData)), ctx);
Expand All @@ -129,6 +131,7 @@ void TColumnShard::Handle(TEvPrivate::TEvWriteBlobsResult::TPtr& ev, const TActo

for (auto&& aggr : baseAggregations) {
const auto& writeMeta = aggr->GetWriteMeta();
aggr->MutableWriteMeta().OnStage(NEvWrite::EWriteStage::Finished);
AFL_DEBUG(NKikimrServices::TX_COLUMNSHARD_WRITE)("event", "blobs_write_finished")("writing_size", aggr->GetSize())(
"writing_id", writeMeta.GetId())("status", putResult.GetPutStatus());
Counters.GetWritesMonitor()->OnFinishWrite(aggr->GetSize(), 1);
Expand Down
4 changes: 4 additions & 0 deletions ydb/core/tx/columnshard/operations/events.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ class TWriteResult {
return *WriteMeta;
}

NEvWrite::TWriteMeta& MutableWriteMeta() const {
return *WriteMeta;
}

const std::shared_ptr<NEvWrite::TWriteMeta>& GetWriteMetaPtr() const {
return WriteMeta;
}
Expand Down

0 comments on commit c279abb

Please sign in to comment.