Skip to content

Commit 3d22318

Browse files
signals to writing trace (#13763)
1 parent 552d995 commit 3d22318

File tree

18 files changed

+217
-74
lines changed

18 files changed

+217
-74
lines changed

ydb/core/tx/columnshard/columnshard__write.cpp

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,10 @@ void TColumnShard::Handle(NPrivateEvents::NWrite::TEvWritePortionResult::TPtr& e
9696
TInsertedPortions writtenData = ev->Get()->DetachInsertedData();
9797
if (ev->Get()->GetWriteStatus() == NKikimrProto::OK) {
9898
const TMonotonic now = TMonotonic::Now();
99-
for (auto&& i: writtenData.GetWriteResults()) {
99+
for (auto&& i : writtenData.GetWriteResults()) {
100100
AFL_DEBUG(NKikimrServices::TX_COLUMNSHARD_WRITE)("writing_size", i.GetDataSize())("event", "data_write_finished")(
101101
"writing_id", i.GetWriteMeta().GetId());
102+
i.MutableWriteMeta().OnStage(NEvWrite::EWriteStage::Finished);
102103
Counters.OnWritePutBlobsSuccess(now - i.GetWriteMeta().GetWriteStartInstant(), i.GetRecordsCount());
103104
Counters.GetWritesMonitor()->OnFinishWrite(i.GetDataSize(), 1);
104105
}
@@ -111,6 +112,7 @@ void TColumnShard::Handle(NPrivateEvents::NWrite::TEvWritePortionResult::TPtr& e
111112
AFL_WARN(NKikimrServices::TX_COLUMNSHARD_WRITE)("writing_size", i.GetDataSize())("event", "data_write_error")(
112113
"writing_id", i.GetWriteMeta().GetId());
113114
Counters.GetWritesMonitor()->OnFinishWrite(i.GetDataSize(), 1);
115+
i.MutableWriteMeta().OnStage(NEvWrite::EWriteStage::Finished);
114116
}
115117

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

130132
for (auto&& aggr : baseAggregations) {
131133
const auto& writeMeta = aggr->GetWriteMeta();
134+
aggr->MutableWriteMeta().OnStage(NEvWrite::EWriteStage::Finished);
132135
AFL_DEBUG(NKikimrServices::TX_COLUMNSHARD_WRITE)("event", "blobs_write_finished")("writing_size", aggr->GetSize())(
133136
"writing_id", writeMeta.GetId())("status", putResult.GetPutStatus());
134137
Counters.GetWritesMonitor()->OnFinishWrite(aggr->GetSize(), 1);
@@ -160,12 +163,6 @@ void TColumnShard::Handle(TEvPrivate::TEvWriteBlobsResult::TPtr& ev, const TActo
160163
} else {
161164
const TMonotonic now = TMonotonic::Now();
162165
Counters.OnWritePutBlobsSuccess(now - writeMeta.GetWriteStartInstant(), aggr->GetRows());
163-
Counters.GetCSCounters().OnWriteMiddle1PutBlobsSuccess(now - writeMeta.GetWriteMiddle1StartInstant());
164-
Counters.GetCSCounters().OnWriteMiddle2PutBlobsSuccess(now - writeMeta.GetWriteMiddle2StartInstant());
165-
Counters.GetCSCounters().OnWriteMiddle3PutBlobsSuccess(now - writeMeta.GetWriteMiddle3StartInstant());
166-
Counters.GetCSCounters().OnWriteMiddle4PutBlobsSuccess(now - writeMeta.GetWriteMiddle4StartInstant());
167-
Counters.GetCSCounters().OnWriteMiddle5PutBlobsSuccess(now - writeMeta.GetWriteMiddle5StartInstant());
168-
Counters.GetCSCounters().OnWriteMiddle6PutBlobsSuccess(now - writeMeta.GetWriteMiddle6StartInstant());
169166
LOG_S_DEBUG("Write (record) into pathId " << writeMeta.GetTableId()
170167
<< (writeMeta.GetWriteId() ? (" writeId " + ToString(writeMeta.GetWriteId())).c_str() : "")
171168
<< " at tablet " << TabletID());
@@ -195,7 +192,9 @@ void TColumnShard::Handle(TEvColumnShard::TEvWrite::TPtr& ev, const TActorContex
195192
granuleShardingVersion = record.GetGranuleShardingVersion();
196193
}
197194

198-
NEvWrite::TWriteMeta writeMeta(writeId, pathId, source, granuleShardingVersion, TGUID::CreateTimebased().AsGuidString());
195+
auto writeMetaPtr = std::make_shared<NEvWrite::TWriteMeta>(writeId, pathId, source, granuleShardingVersion,
196+
TGUID::CreateTimebased().AsGuidString(), Counters.GetCSCounters().WritingCounters->GetWriteFlowCounters());
197+
auto& writeMeta = *writeMetaPtr;
199198
if (record.HasModificationType()) {
200199
writeMeta.SetModificationType(TEnumOperator<NEvWrite::EModificationType>::DeserializeFromProto(record.GetModificationType()));
201200
}
@@ -243,7 +242,7 @@ void TColumnShard::Handle(TEvColumnShard::TEvWrite::TPtr& ev, const TActorContex
243242
return returnFail(COUNTER_WRITE_FAIL, EWriteFailReason::IncorrectSchema);
244243
}
245244

246-
NEvWrite::TWriteData writeData(writeMeta, arrowData, snapshotSchema->GetIndexInfo().GetReplaceKey(),
245+
NEvWrite::TWriteData writeData(writeMetaPtr, arrowData, snapshotSchema->GetIndexInfo().GetReplaceKey(),
247246
StoragesManager->GetInsertOperator()->StartWritingAction(NOlap::NBlobOperations::EConsumer::WRITING), false);
248247
auto overloadStatus = CheckOverloadedImmediate(pathId);
249248
if (overloadStatus == EOverloadStatus::None) {
@@ -273,13 +272,11 @@ void TColumnShard::Handle(TEvColumnShard::TEvWrite::TPtr& ev, const TActorContex
273272
LOG_S_DEBUG("Write (blob) " << writeData.GetSize() << " bytes into pathId " << writeMeta.GetTableId()
274273
<< (writeMeta.GetWriteId() ? (" writeId " + ToString(writeMeta.GetWriteId())).c_str() : " ")
275274
<< Counters.GetWritesMonitor()->DebugString() << " at tablet " << TabletID());
276-
writeData.MutableWriteMeta().SetWriteMiddle1StartInstant(TMonotonic::Now());
277275

278276
NOlap::TWritingContext context(TabletID(), SelfId(), snapshotSchema, StoragesManager, Counters.GetIndexationCounters().SplitterCounters,
279277
Counters.GetCSCounters().WritingCounters, GetLastTxSnapshot(), std::make_shared<TAtomicCounter>(1), true,
280278
BufferizationInsertionWriteActorId, BufferizationPortionsWriteActorId);
281-
std::shared_ptr<NConveyor::ITask> task =
282-
std::make_shared<NOlap::TBuildBatchesTask>(std::move(writeData), context);
279+
std::shared_ptr<NConveyor::ITask> task = std::make_shared<NOlap::TBuildBatchesTask>(std::move(writeData), context);
283280
NConveyor::TInsertServiceOperator::AsyncTaskToExecute(task);
284281
}
285282
}
@@ -571,7 +568,9 @@ void TColumnShard::Handle(NEvents::TDataEvents::TEvWrite::TPtr& ev, const TActor
571568
if (overloadStatus != EOverloadStatus::None) {
572569
std::unique_ptr<NActors::IEventBase> result = NEvents::TDataEvents::TEvWriteResult::BuildError(
573570
TabletID(), 0, NKikimrDataEvents::TEvWriteResult::STATUS_OVERLOADED, "overload data error");
574-
OverloadWriteFail(overloadStatus, NEvWrite::TWriteMeta(0, pathId, source, {}, TGUID::CreateTimebased().AsGuidString()),
571+
OverloadWriteFail(overloadStatus,
572+
NEvWrite::TWriteMeta(0, pathId, source, {}, TGUID::CreateTimebased().AsGuidString(),
573+
Counters.GetCSCounters().WritingCounters->GetWriteFlowCounters()),
575574
arrowData->GetSize(), cookie, std::move(result), ctx);
576575
return;
577576
}

ydb/core/tx/columnshard/counters/columnshard.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "common/owner.h"
66

77
#include <ydb/core/tx/columnshard/counters/tablet_counters.h>
8+
#include <ydb/core/tx/data_events/common/signals_flow.h>
89

910
#include <library/cpp/monlib/dynamic_counters/counters.h>
1011
#include <util/generic/hash_set.h>
@@ -30,18 +31,19 @@ class TWriteCounters: public TCommonCountersOwner {
3031
NMonitoring::THistogramPtr HistogramDurationQueueWait;
3132
NMonitoring::THistogramPtr HistogramBatchDataCount;
3233
NMonitoring::THistogramPtr HistogramBatchDataSize;
34+
YDB_READONLY_DEF(std::shared_ptr<NEvWrite::TWriteFlowCounters>, WriteFlowCounters);
3335

3436
public:
3537
const NMonitoring::TDynamicCounters::TCounterPtr QueueWaitSize;
3638

37-
void OnWritingTaskDequeue(const TDuration d){
39+
void OnWritingTaskDequeue(const TDuration d) {
3840
HistogramDurationQueueWait->Collect(d.MilliSeconds());
3941
}
4042

4143
TWriteCounters(TCommonCountersOwner& owner)
4244
: TBase(owner, "activity", "writing")
43-
, QueueWaitSize(TBase::GetValue("Write/Queue/Size"))
44-
{
45+
, WriteFlowCounters(std::make_shared<NEvWrite::TWriteFlowCounters>())
46+
, QueueWaitSize(TBase::GetValue("Write/Queue/Size")) {
4547
VolumeWriteData = TBase::GetDeriviative("Write/Incoming/Bytes");
4648
HistogramBytesWriteDataCount = TBase::GetHistogram("Write/Incoming/ByBytes/Count", NMonitoring::ExponentialHistogram(18, 2, 100));
4749
HistogramBytesWriteDataBytes = TBase::GetHistogram("Write/Incoming/ByBytes/Bytes", NMonitoring::ExponentialHistogram(18, 2, 100));

ydb/core/tx/columnshard/counters/counters_manager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,4 @@ class TCountersManager {
9999
}
100100
};
101101

102-
} // namespace NKikimr::NColumnShard
102+
} // namespace NKikimr::NColumnShard

ydb/core/tx/columnshard/engines/writer/indexed_blob_constructor.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,22 +53,22 @@ std::shared_ptr<NKikimr::NOlap::TUserData> TWideSerializedBatch::BuildInsertionU
5353
return std::make_shared<NOlap::TUserData>(writeMeta.GetTableId(), blobRange, meta, tableSchema->GetVersion(), SplittedBlobs.GetData());
5454
}
5555

56-
void TWritingBuffer::InitReadyInstant(const TMonotonic instant) {
57-
for (auto&& aggr : Aggregations) {
58-
aggr->MutableWriteMeta().SetWriteMiddle5StartInstant(instant);
59-
}
56+
void TWritingBuffer::InitReadyInstant(const TMonotonic /*instant*/) {
57+
// for (auto&& aggr : Aggregations) {
58+
// aggr->MutableWriteMeta().SetWriteMiddle5StartInstant(instant);
59+
// }
6060
}
6161

62-
void TWritingBuffer::InitStartSending(const TMonotonic instant) {
63-
for (auto&& aggr : Aggregations) {
64-
aggr->MutableWriteMeta().SetWriteMiddle4StartInstant(instant);
65-
}
62+
void TWritingBuffer::InitStartSending(const TMonotonic /*instant*/) {
63+
// for (auto&& aggr : Aggregations) {
64+
// aggr->MutableWriteMeta().SetWriteMiddle4StartInstant(instant);
65+
// }
6666
}
6767

68-
void TWritingBuffer::InitReplyReceived(const TMonotonic instant) {
69-
for (auto&& aggr : Aggregations) {
70-
aggr->MutableWriteMeta().SetWriteMiddle6StartInstant(instant);
71-
}
68+
void TWritingBuffer::InitReplyReceived(const TMonotonic /*instant*/) {
69+
// for (auto&& aggr : Aggregations) {
70+
// aggr->MutableWriteMeta().SetWriteMiddle6StartInstant(instant);
71+
// }
7272
}
7373

7474
std::vector<NKikimr::NOlap::TWritingBlob> TWritingBuffer::GroupIntoBlobs() {

ydb/core/tx/columnshard/engines/writer/indexed_blob_constructor.h

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class TWritingBlob {
9292

9393
class TWriteAggregation {
9494
private:
95-
NEvWrite::TWriteMeta WriteMeta;
95+
std::shared_ptr<NEvWrite::TWriteMeta> WriteMeta;
9696
YDB_READONLY(ui64, SchemaVersion, 0);
9797
YDB_READONLY(ui64, Size, 0);
9898
YDB_READONLY(ui64, Rows, 0);
@@ -109,11 +109,15 @@ class TWriteAggregation {
109109
}
110110

111111
const NEvWrite::TWriteMeta& GetWriteMeta() const {
112+
return *WriteMeta;
113+
}
114+
115+
const std::shared_ptr<NEvWrite::TWriteMeta>& GetWriteMetaPtr() const {
112116
return WriteMeta;
113117
}
114118

115119
NEvWrite::TWriteMeta& MutableWriteMeta() {
116-
return WriteMeta;
120+
return *WriteMeta;
117121
}
118122

119123
void AddInsertWriteId(const TInsertWriteId id) {
@@ -122,12 +126,13 @@ class TWriteAggregation {
122126

123127
TWriteAggregation(const NEvWrite::TWriteData& writeData, std::vector<NArrow::TSerializedBatch>&& splittedBlobs,
124128
const std::shared_ptr<arrow::RecordBatch>& batch)
125-
: WriteMeta(writeData.GetWriteMeta())
129+
: WriteMeta(writeData.GetWriteMetaPtr())
126130
, SchemaVersion(writeData.GetData()->GetSchemaVersion())
127131
, Size(writeData.GetSize())
128132
, BlobsAction(writeData.GetBlobsAction())
129133
, SchemaSubset(writeData.GetSchemaSubsetVerified())
130134
, RecordBatch(batch) {
135+
AFL_VERIFY(WriteMeta);
131136
for (auto&& s : splittedBlobs) {
132137
SplittedBlobs.emplace_back(std::move(s), *this);
133138
}
@@ -137,7 +142,7 @@ class TWriteAggregation {
137142
}
138143

139144
TWriteAggregation(const NEvWrite::TWriteData& writeData)
140-
: WriteMeta(writeData.GetWriteMeta())
145+
: WriteMeta(writeData.GetWriteMetaPtr())
141146
, SchemaVersion(writeData.GetData()->GetSchemaVersion())
142147
, Size(writeData.GetSize())
143148
, BlobsAction(writeData.GetBlobsAction()) {

ydb/core/tx/columnshard/operations/batch_builder/builder.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class TBuildBatchesTask: public NConveyor::ITask, public NColumnShard::TMonitori
2828
: WriteData(std::move(writeData))
2929
, ActualSnapshot(context.GetApplyToSnapshot())
3030
, Context(context) {
31+
WriteData.MutableWriteMeta().OnStage(NEvWrite::EWriteStage::BuildBatch);
3132
}
3233
};
3334
} // namespace NKikimr::NOlap

ydb/core/tx/columnshard/operations/events.cpp

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "events.h"
22

3-
#include <ydb/core/tx/columnshard/engines/column_engine_logs.h>
43
#include <ydb/core/tx/columnshard/columnshard_impl.h>
4+
#include <ydb/core/tx/columnshard/engines/column_engine_logs.h>
55

66
namespace NKikimr::NColumnShard {
77

@@ -15,6 +15,26 @@ void TInsertedPortion::Finalize(TColumnShard* shard, NTabletFlatExecutor::TTrans
1515
PortionInfoConstructor = nullptr;
1616
}
1717

18+
TWriteResult::TWriteResult(const std::shared_ptr<NEvWrite::TWriteMeta>& writeMeta, const ui64 dataSize,
19+
const std::shared_ptr<arrow::RecordBatch>& pkBatch,
20+
const bool noDataToWrite, const ui32 recordsCount)
21+
: WriteMeta(writeMeta)
22+
, DataSize(dataSize)
23+
, NoDataToWrite(noDataToWrite)
24+
, PKBatch(pkBatch)
25+
, RecordsCount(recordsCount) {
26+
AFL_VERIFY(WriteMeta);
27+
WriteMeta->OnStage(NEvWrite::EWriteStage::Result);
28+
}
29+
1830
} // namespace NKikimr::NColumnShard
1931

20-
namespace NKikimr::NColumnShard::NPrivateEvents::NWrite {}
32+
namespace NKikimr::NColumnShard::NPrivateEvents::NWrite {
33+
TEvWritePortionResult::TEvWritePortionResult(const NKikimrProto::EReplyStatus writeStatus,
34+
const std::shared_ptr<NOlap::IBlobsWritingAction>& writeAction, TInsertedPortions&& insertedData)
35+
: WriteStatus(writeStatus)
36+
, WriteAction(writeAction)
37+
, InsertedData(std::move(insertedData)) {
38+
}
39+
40+
} // namespace NKikimr::NColumnShard::NPrivateEvents::NWrite

ydb/core/tx/columnshard/operations/events.h

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class TInsertedPortion {
2525

2626
class TWriteResult {
2727
private:
28-
NEvWrite::TWriteMeta WriteMeta;
28+
std::shared_ptr<NEvWrite::TWriteMeta> WriteMeta;
2929
YDB_READONLY(ui64, DataSize, 0);
3030
YDB_READONLY(bool, NoDataToWrite, false);
3131
std::shared_ptr<arrow::RecordBatch> PKBatch;
@@ -42,18 +42,19 @@ class TWriteResult {
4242
}
4343

4444
const NEvWrite::TWriteMeta& GetWriteMeta() const {
45-
return WriteMeta;
45+
return *WriteMeta;
46+
}
47+
48+
NEvWrite::TWriteMeta& MutableWriteMeta() const {
49+
return *WriteMeta;
4650
}
4751

48-
TWriteResult(const NEvWrite::TWriteMeta& writeMeta, const ui64 dataSize, const std::shared_ptr<arrow::RecordBatch>& pkBatch,
49-
const bool noDataToWrite, const ui32 recordsCount)
50-
: WriteMeta(writeMeta)
51-
, DataSize(dataSize)
52-
, NoDataToWrite(noDataToWrite)
53-
, PKBatch(pkBatch)
54-
, RecordsCount(recordsCount)
55-
{
52+
const std::shared_ptr<NEvWrite::TWriteMeta>& GetWriteMetaPtr() const {
53+
return WriteMeta;
5654
}
55+
56+
TWriteResult(const std::shared_ptr<NEvWrite::TWriteMeta>& writeMeta, const ui64 dataSize, const std::shared_ptr<arrow::RecordBatch>& pkBatch,
57+
const bool noDataToWrite, const ui32 recordsCount);
5758
};
5859

5960
class TInsertedPortions {
@@ -69,6 +70,7 @@ class TInsertedPortions {
6970
AFL_VERIFY(WriteResults.size());
7071
std::optional<ui64> pathId;
7172
for (auto&& i : WriteResults) {
73+
i.GetWriteMeta().OnStage(NEvWrite::EWriteStage::Finished);
7274
AFL_VERIFY(!i.GetWriteMeta().HasLongTxId());
7375
if (!pathId) {
7476
pathId = i.GetWriteMeta().GetTableId();
@@ -100,11 +102,7 @@ class TEvWritePortionResult: public TEventLocal<TEvWritePortionResult, TEvPrivat
100102
}
101103

102104
TEvWritePortionResult(const NKikimrProto::EReplyStatus writeStatus, const std::shared_ptr<NOlap::IBlobsWritingAction>& writeAction,
103-
TInsertedPortions&& insertedData)
104-
: WriteStatus(writeStatus)
105-
, WriteAction(writeAction)
106-
, InsertedData(std::move(insertedData)) {
107-
}
105+
TInsertedPortions&& insertedData);
108106
};
109107

110108
} // namespace NKikimr::NColumnShard::NPrivateEvents::NWrite

ydb/core/tx/columnshard/operations/slice_builder/builder.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,9 @@ class TPortionWriteController: public NColumnShard::IWriteController,
9999
};
100100

101101
TConclusionStatus TBuildSlicesTask::DoExecute(const std::shared_ptr<ITask>& /*taskPtr*/) {
102-
const NActors::TLogContextGuard g = NActors::TLogContextBuilder::Build(NKikimrServices::TX_COLUMNSHARD_WRITE)("tablet_id", TabletId)("parent_id",
103-
Context.GetTabletActorId())("write_id", WriteData.GetWriteMeta().GetWriteId())("table_id", WriteData.GetWriteMeta().GetTableId());
102+
const NActors::TLogContextGuard g = NActors::TLogContextBuilder::Build(NKikimrServices::TX_COLUMNSHARD_WRITE)("tablet_id", TabletId)(
103+
"parent_id", Context.GetTabletActorId())("write_id", WriteData.GetWriteMeta().GetWriteId())(
104+
"table_id", WriteData.GetWriteMeta().GetTableId());
104105
if (!Context.IsActive()) {
105106
AFL_WARN(NKikimrServices::TX_COLUMNSHARD_WRITE)("event", "abort_execution");
106107
ReplyError("execution aborted", NColumnShard::TEvPrivate::TEvWriteBlobsResult::EErrorClass::Internal);
@@ -113,7 +114,7 @@ TConclusionStatus TBuildSlicesTask::DoExecute(const std::shared_ptr<ITask>& /*ta
113114
}
114115
if (WriteData.GetWritePortions()) {
115116
if (OriginalBatch->num_rows() == 0) {
116-
NColumnShard::TWriteResult wResult(WriteData.GetWriteMeta(), WriteData.GetSize(), nullptr, true, 0);
117+
NColumnShard::TWriteResult wResult(WriteData.GetWriteMetaPtr(), WriteData.GetSize(), nullptr, true, 0);
117118
NColumnShard::TInsertedPortions pack({ wResult }, {});
118119
auto result = std::make_unique<NColumnShard::NPrivateEvents::NWrite::TEvWritePortionResult>(
119120
NKikimrProto::EReplyStatus::OK, nullptr, std::move(pack));
@@ -123,7 +124,7 @@ TConclusionStatus TBuildSlicesTask::DoExecute(const std::shared_ptr<ITask>& /*ta
123124
NArrow::TColumnOperator().Extract(OriginalBatch, Context.GetActualSchema()->GetIndexInfo().GetPrimaryKey()->fields());
124125
auto batches = NArrow::NMerger::TRWSortableBatchPosition::SplitByBordersInIntervalPositions(OriginalBatch,
125126
Context.GetActualSchema()->GetIndexInfo().GetPrimaryKey()->field_names(), WriteData.GetData()->GetSeparationPoints());
126-
NColumnShard::TWriteResult wResult(WriteData.GetWriteMeta(), WriteData.GetSize(), pkBatch, false, OriginalBatch->num_rows());
127+
NColumnShard::TWriteResult wResult(WriteData.GetWriteMetaPtr(), WriteData.GetSize(), pkBatch, false, OriginalBatch->num_rows());
127128
std::vector<TPortionWriteController::TInsertPortion> portions;
128129
for (auto&& batch : batches) {
129130
if (!batch) {
@@ -174,9 +175,7 @@ TConclusionStatus TBuildSlicesTask::DoExecute(const std::shared_ptr<ITask>& /*ta
174175
OriginalBatch = NArrow::ToBatch(normalized->BuildTableVerified(), true);
175176
}
176177
}
177-
WriteData.MutableWriteMeta().SetWriteMiddle2StartInstant(TMonotonic::Now());
178178
auto batches = BuildSlices();
179-
WriteData.MutableWriteMeta().SetWriteMiddle3StartInstant(TMonotonic::Now());
180179
if (batches) {
181180
auto writeDataPtr = std::make_shared<NEvWrite::TWriteData>(std::move(WriteData));
182181
writeDataPtr->SetSchemaSubset(std::move(subset));

ydb/core/tx/columnshard/operations/slice_builder/builder.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class TBuildSlicesTask: public NConveyor::ITask, public NColumnShard::TMonitorin
3131
, TabletId(WriteData.GetWriteMeta().GetTableId())
3232
, OriginalBatch(batch)
3333
, Context(context) {
34+
WriteData.MutableWriteMeta().OnStage(NEvWrite::EWriteStage::BuildSlices);
3435
}
3536
};
3637
} // namespace NKikimr::NOlap

0 commit comments

Comments
 (0)