@@ -23,13 +23,15 @@ static constexpr TDuration RL_MAX_BATCH_DELAY = TDuration::Seconds(50);
23
23
24
24
} // anonymous namespace
25
25
26
- TKqpScanComputeActor::TKqpScanComputeActor (const TActorId& executerId, ui64 txId, NDqProto::TDqTask* task ,
27
- IDqAsyncIoFactory::TPtr asyncIoFactory,
26
+ TKqpScanComputeActor::TKqpScanComputeActor (TComputeActorSchedulingOptions cpuOptions, const TActorId& executerId, ui64 txId, ui64 lockTxId, ui32 lockNodeId ,
27
+ NDqProto::TDqTask* task, IDqAsyncIoFactory::TPtr asyncIoFactory,
28
28
const TComputeRuntimeSettings& settings, const TComputeMemoryLimits& memoryLimits, NWilson::TTraceId traceId,
29
29
TIntrusivePtr<NActors::TProtoArenaHolder> arena)
30
30
: TBase(executerId, txId, task, std::move(asyncIoFactory), AppData()->FunctionRegistry, settings,
31
31
memoryLimits, /* ownMemoryQuota = */ true, /* passExceptions = */ true, /* taskCounters = */ nullptr, std::move(traceId), std::move(arena))
32
32
, ComputeCtx(settings.StatsMode)
33
+ , LockTxId(lockTxId)
34
+ , LockNodeId(lockNodeId)
33
35
{
34
36
InitializeTask ();
35
37
YQL_ENSURE (GetTask ().GetMeta ().UnpackTo (&Meta), " Invalid task meta: " << GetTask ().GetMeta ().DebugString ());
@@ -103,6 +105,19 @@ void TKqpScanComputeActor::FillExtraStats(NDqProto::TDqComputeActorStats* dst, b
103
105
}
104
106
}
105
107
108
+ TMaybe<google::protobuf::Any> TKqpScanComputeActor::ExtraData () {
109
+ NKikimrTxDataShard::TEvKqpInputActorResultInfo resultInfo;
110
+ for (const auto & lock : Locks) {
111
+ resultInfo.AddLocks ()->CopyFrom (lock);
112
+ }
113
+ for (const auto & lock : BrokenLocks) {
114
+ resultInfo.AddLocks ()->CopyFrom (lock);
115
+ }
116
+ google::protobuf::Any result;
117
+ result.PackFrom (resultInfo);
118
+ return result;
119
+ }
120
+
106
121
void TKqpScanComputeActor::HandleEvWakeup (EEvWakeupTag tag) {
107
122
AFL_DEBUG (NKikimrServices::KQP_COMPUTE)(" event" , " HandleEvWakeup" )(" self_id" , SelfId ());
108
123
switch (tag) {
@@ -130,6 +145,14 @@ void TKqpScanComputeActor::Handle(TEvScanExchange::TEvTerminateFromFetcher::TPtr
130
145
void TKqpScanComputeActor::Handle (TEvScanExchange::TEvSendData::TPtr& ev) {
131
146
ALS_DEBUG (NKikimrServices::KQP_COMPUTE) << " TEvSendData: " << ev->Sender << " /" << SelfId ();
132
147
auto & msg = *ev->Get ();
148
+
149
+ for (const auto & lock : msg.GetLocksInfo ().Locks ) {
150
+ Locks.insert (lock);
151
+ }
152
+ for (const auto & lock : msg.GetLocksInfo ().Locks ) {
153
+ BrokenLocks.insert (lock);
154
+ }
155
+
133
156
auto guard = TaskRunner->BindAllocator ();
134
157
if (!!msg.GetArrowBatch ()) {
135
158
ScanData->AddData (NMiniKQL::TBatchDataAccessor (msg.GetArrowBatch (), std::move (msg.MutableDataIndexes ())), msg.GetTabletId (), TaskRunner->GetHolderFactory ());
0 commit comments