diff --git a/ydb/core/keyvalue/keyvalue_flat_impl.h b/ydb/core/keyvalue/keyvalue_flat_impl.h index 874776a6c89f..2d6c0a1aea16 100644 --- a/ydb/core/keyvalue/keyvalue_flat_impl.h +++ b/ydb/core/keyvalue/keyvalue_flat_impl.h @@ -15,6 +15,7 @@ #include #include +#include #include #include #include @@ -388,7 +389,8 @@ class TKeyValueFlat : public TActor, public NTabletFlatExecutor:: CheckYellowChannels(ev->Get()->Intermediate->Stat); State.OnEvIntermediate(*(ev->Get()->Intermediate), ctx); - Execute(new TTxRequest(std::move(ev->Get()->Intermediate), this), ctx); + auto traceId = ev->Get()->Intermediate->Span.GetTraceId(); + Execute(new TTxRequest(std::move(ev->Get()->Intermediate), this), ctx, std::move(traceId)); } void Handle(TEvKeyValue::TEvNotify::TPtr &ev, const TActorContext &ctx) { diff --git a/ydb/core/keyvalue/keyvalue_intermediate.cpp b/ydb/core/keyvalue/keyvalue_intermediate.cpp index 54a63fdab8f9..ed8fa1c355f0 100644 --- a/ydb/core/keyvalue/keyvalue_intermediate.cpp +++ b/ydb/core/keyvalue/keyvalue_intermediate.cpp @@ -1,5 +1,6 @@ #include "keyvalue_intermediate.h" #include +#include #include namespace NKikimr { @@ -61,7 +62,7 @@ TRope TIntermediate::TRead::BuildRope() { } TIntermediate::TIntermediate(TActorId respondTo, TActorId keyValueActorId, ui64 channelGeneration, ui64 channelStep, - TRequestType::EType requestType) + TRequestType::EType requestType, NWilson::TTraceId traceId) : Cookie(0) , Generation(0) , Deadline(TInstant::Max()) @@ -79,6 +80,7 @@ TIntermediate::TIntermediate(TActorId respondTo, TActorId keyValueActorId, ui64 , CreatedAtGeneration(channelGeneration) , CreatedAtStep(channelStep) , IsReplied(false) + , Span(TWilsonTablet::Tablet, std::move(traceId), "KeyValue.Intermediate", NWilson::EFlags::AUTO_END) { Stat.IntermediateCreatedAt = TAppData::TimeProvider->Now(); Stat.RequestType = requestType; diff --git a/ydb/core/keyvalue/keyvalue_intermediate.h b/ydb/core/keyvalue/keyvalue_intermediate.h index 3812a8e7fa5f..fb2895d22a1a 100644 --- a/ydb/core/keyvalue/keyvalue_intermediate.h +++ b/ydb/core/keyvalue/keyvalue_intermediate.h @@ -9,6 +9,7 @@ #include #include #include +#include namespace NKikimr { namespace NKeyValue { @@ -163,8 +164,10 @@ struct TIntermediate { ui32 EvType = 0; + NWilson::TSpan Span; + TIntermediate(TActorId respondTo, TActorId keyValueActorId, ui64 channelGeneration, ui64 channelStep, - TRequestType::EType requestType); + TRequestType::EType requestType, NWilson::TTraceId traceId); void UpdateStat(); }; diff --git a/ydb/core/keyvalue/keyvalue_state.cpp b/ydb/core/keyvalue/keyvalue_state.cpp index d35b397be617..73e6cc76e4bf 100644 --- a/ydb/core/keyvalue/keyvalue_state.cpp +++ b/ydb/core/keyvalue/keyvalue_state.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -2653,7 +2654,7 @@ bool TKeyValueState::PrepareReadRequest(const TActorContext &ctx, TEvKeyValue::T StoredState.SetChannelStep(NextLogoBlobStep - 1); intermediate.Reset(new TIntermediate(ev->Sender, ctx.SelfID, - StoredState.GetChannelGeneration(), StoredState.GetChannelStep(), TRequestType::ReadOnly)); + StoredState.GetChannelGeneration(), StoredState.GetChannelStep(), TRequestType::ReadOnly, std::move(ev->TraceId))); intermediate->HasCookie = true; intermediate->Cookie = request.cookie(); @@ -2707,7 +2708,7 @@ bool TKeyValueState::PrepareReadRangeRequest(const TActorContext &ctx, TEvKeyVal TRequestType::EType requestType = TRequestType::ReadOnly; intermediate.Reset(new TIntermediate(ev->Sender, ctx.SelfID, - StoredState.GetChannelGeneration(), StoredState.GetChannelStep(), requestType)); + StoredState.GetChannelGeneration(), StoredState.GetChannelStep(), requestType, std::move(ev->TraceId))); intermediate->HasCookie = true; intermediate->Cookie = request.cookie(); @@ -2774,7 +2775,7 @@ bool TKeyValueState::PrepareExecuteTransactionRequest(const TActorContext &ctx, TRequestType::EType requestType = TRequestType::WriteOnly; intermediate.Reset(new TIntermediate(ev->Sender, ctx.SelfID, - StoredState.GetChannelGeneration(), StoredState.GetChannelStep(), requestType)); + StoredState.GetChannelGeneration(), StoredState.GetChannelStep(), requestType, std::move(ev->TraceId))); intermediate->HasCookie = true; intermediate->Cookie = request.cookie(); @@ -2834,7 +2835,7 @@ bool TKeyValueState::PrepareGetStorageChannelStatusRequest(const TActorContext & TRequestType::EType requestType = TRequestType::ReadOnly; intermediate.Reset(new TIntermediate(ev->Sender, ctx.SelfID, - StoredState.GetChannelGeneration(), StoredState.GetChannelStep(), requestType)); + StoredState.GetChannelGeneration(), StoredState.GetChannelStep(), requestType, std::move(ev->TraceId))); intermediate->RequestUid = NextRequestUid; ++NextRequestUid; @@ -2869,7 +2870,7 @@ bool TKeyValueState::PrepareAcquireLockRequest(const TActorContext &ctx, TEvKeyV TRequestType::EType requestType = TRequestType::ReadOnlyInline; intermediate.Reset(new TIntermediate(ev->Sender, ctx.SelfID, - StoredState.GetChannelGeneration(), StoredState.GetChannelStep(), requestType)); + StoredState.GetChannelGeneration(), StoredState.GetChannelStep(), requestType, std::move(ev->TraceId))); intermediate->RequestUid = NextRequestUid; ++NextRequestUid; @@ -3160,7 +3161,7 @@ bool TKeyValueState::PrepareIntermediate(TEvKeyValue::TEvRequest::TPtr &ev, THol StoredState.SetChannelStep(NextLogoBlobStep - 1); intermediate.Reset(new TIntermediate(ev->Sender, ctx.SelfID, - StoredState.GetChannelGeneration(), StoredState.GetChannelStep(), inOutRequestType)); + StoredState.GetChannelGeneration(), StoredState.GetChannelStep(), inOutRequestType, std::move(ev->TraceId))); intermediate->RequestUid = NextRequestUid; ++NextRequestUid; RequestInputTime[intermediate->RequestUid] = TAppData::TimeProvider->Now(); diff --git a/ydb/core/keyvalue/keyvalue_state.h b/ydb/core/keyvalue/keyvalue_state.h index 01bf5ab969e2..0b4241dda105 100644 --- a/ydb/core/keyvalue/keyvalue_state.h +++ b/ydb/core/keyvalue/keyvalue_state.h @@ -392,7 +392,7 @@ class TKeyValueState { template bool CheckCmds(THolder& intermediate, const TDeque& cmds, const TActorContext& ctx, - TKeySet& keys, const TTabletStorageInfo* info); + TKeySet& keys, const TTabletStorageInfo* info); bool CheckCmds(THolder& intermediate, const TActorContext& /*ctx*/, TKeySet& keys, const TTabletStorageInfo* /*info*/); diff --git a/ydb/core/keyvalue/keyvalue_storage_read_request.cpp b/ydb/core/keyvalue/keyvalue_storage_read_request.cpp index 1e87c569da4e..4f2eff31c654 100644 --- a/ydb/core/keyvalue/keyvalue_storage_read_request.cpp +++ b/ydb/core/keyvalue/keyvalue_storage_read_request.cpp @@ -3,6 +3,8 @@ #include #include +#include +#include #include @@ -50,6 +52,8 @@ class TKeyValueStorageReadRequest : public TActorBootstrapped ReadItems; + NWilson::TSpan Span; + public: static constexpr NKikimrServices::TActivity::EType ActorActivityType() { return NKikimrServices::TActivity::KEYVALUE_ACTOR; @@ -189,7 +193,7 @@ class TKeyValueStorageReadRequest : public TActorBootstrappedReaderTabletData = {TabletInfo->TabletID, TabletGeneration}; SendToBSProxy(TActivationContext::AsActorContext(), batch.GroupId, ev.release(), - batch.Cookie); + batch.Cookie, Span.GetTraceId()); batch.SentTime = TActivationContext::Now(); } } @@ -378,6 +382,7 @@ class TKeyValueStorageReadRequest : public TActorBootstrappedRespondTo, response.release()); IntermediateResult->IsReplied = true; SendNotify(status); + Span.EndError(TStringBuilder() << NKikimrKeyValue::Statuses::ReplyStatus_Name(status)); PassAway(); } @@ -489,6 +494,7 @@ class TKeyValueStorageReadRequest : public TActorBootstrappedRespondTo, response.release()); IntermediateResult->IsReplied = true; SendNotify(status); + Span.EndOk(); PassAway(); } @@ -505,6 +511,7 @@ class TKeyValueStorageReadRequest : public TActorBootstrapped(tabletInfo)) , TabletGeneration(tabletGeneration) + , Span(TWilsonTablet::Tablet, IntermediateResult->Span.GetTraceId(), "KeyValue.StorageReadRequest") {} }; diff --git a/ydb/core/keyvalue/keyvalue_storage_read_request_ut.cpp b/ydb/core/keyvalue/keyvalue_storage_read_request_ut.cpp index 36cc8b60893c..0b795e2d3ed8 100644 --- a/ydb/core/keyvalue/keyvalue_storage_read_request_ut.cpp +++ b/ydb/core/keyvalue/keyvalue_storage_read_request_ut.cpp @@ -186,7 +186,7 @@ struct TReadRequestBuilder { TBuilderResult Build(TActorId respondTo, TActorId keyValueActorId, ui32 channelGeneration = 1, ui32 channelStep = 1) { std::unique_ptr intermediate = std::make_unique(respondTo, keyValueActorId, - channelGeneration, channelStep, TRequestType::ReadOnly); + channelGeneration, channelStep, TRequestType::ReadOnly, NWilson::TTraceId()); TStringBuilder valueBuilder; for (auto &[value, blobId, offset, size] : Items) { valueBuilder << value; @@ -231,7 +231,7 @@ struct TRangeReadRequestBuilder { TBuilderResult Build(TActorId respondTo, TActorId keyValueActorId, ui32 channelGeneration = 1, ui32 channelStep = 1) { std::unique_ptr intermediate = std::make_unique(respondTo, keyValueActorId, - channelGeneration, channelStep, TRequestType::ReadOnly); + channelGeneration, channelStep, TRequestType::ReadOnly, NWilson::TTraceId()); TBuilderResult res; intermediate->ReadCommand = TIntermediate::TRangeRead(); diff --git a/ydb/core/keyvalue/keyvalue_storage_request.cpp b/ydb/core/keyvalue/keyvalue_storage_request.cpp index 1f6a139c55eb..9aa0a83cdfa1 100644 --- a/ydb/core/keyvalue/keyvalue_storage_request.cpp +++ b/ydb/core/keyvalue/keyvalue_storage_request.cpp @@ -1,10 +1,12 @@ #include "keyvalue_flat_impl.h" -#include -#include #include #include #include +#include +#include +#include +#include namespace NKikimr { namespace NKeyValue { @@ -62,6 +64,8 @@ class TKeyValueStorageRequest : public TActorBootstrapped YellowMoveChannels; TStackVec YellowStopChannels; + NWilson::TSpan Span; + public: static constexpr NKikimrServices::TActivity::EType ActorActivityType() { return NKikimrServices::TActivity::KEYVALUE_ACTOR; @@ -84,6 +88,7 @@ class TKeyValueStorageRequest : public TActorBootstrapped(tabletInfo)) + , Span(TWilsonTablet::Tablet, IntermediateResults->Span.GetTraceId(), "KeyValue.StorageRequest") { IntermediateResults->Stat.KeyvalueStorageRequestSentAt = TAppData::TimeProvider->Now(); } @@ -377,6 +382,7 @@ class TKeyValueStorageRequest : public TActorBootstrappedKeyValueActorId; ctx.Send(keyValueActorId, new TEvKeyValue::TEvIntermediate(std::move(IntermediateResults))); + Span.EndOk(); Die(ctx); return true; } @@ -482,7 +488,9 @@ class TKeyValueStorageRequest : public TActorBootstrappedRequestUid, IntermediateResults->CreatedAtGeneration, IntermediateResults->CreatedAtStep, - IntermediateResults->Stat, status, std::move(IntermediateResults->RefCountsIncr))); + IntermediateResults->Stat, status, std::move(IntermediateResults->RefCountsIncr)), 0, 0, Span.GetTraceId()); + + Span.EndError(TStringBuilder() << status << ": " << errorDescription); Die(ctx); } @@ -588,7 +596,7 @@ class TKeyValueStorageRequest : public TActorBootstrapped(readQueries, readQueryCount, IntermediateResults->Deadline, handleClass, false); ev->ReaderTabletData = {TabletInfo->TabletID, TabletGeneration}; - SendToBSProxy(ctx, prevGroup, ev.release(), cookie); + SendToBSProxy(ctx, prevGroup, ev.release(), cookie, Span.GetTraceId()); return true; } @@ -599,7 +607,7 @@ class TKeyValueStorageRequest : public TActorBootstrappedDeadline), i); + new TEvBlobStorage::TEvStatus(IntermediateResults->Deadline), i, Span.GetTraceId()); ++GetStatusRequestsSent; } } @@ -616,7 +624,7 @@ class TKeyValueStorageRequest : public TActorBootstrapped(), Max(), channel, TLogoBlobID::MaxBlobSize, TLogoBlobID::MaxCookie); auto request = MakeHolder(tabletId, from, to, false, TInstant::Max(), true); - SendToBSProxy(ctx, groupId, request.Release()); + SendToBSProxy(ctx, groupId, request.Release(), 0, Span.GetTraceId()); ++RangeRequestsSent; } } @@ -647,7 +655,7 @@ class TKeyValueStorageRequest : public TActorBootstrappedToString() << " to groupId# " << groupId << " now# " << TAppData::TimeProvider->Now().MilliSeconds() << " Marker# KV60"); - SendPutToGroup(ctx, groupId, TabletInfo.Get(), std::move(put), i); + SendPutToGroup(ctx, groupId, TabletInfo.Get(), std::move(put), i, Span.GetTraceId()); ++WriteRequestsSent; } diff --git a/ydb/core/kqp/session_actor/kqp_session_actor.cpp b/ydb/core/kqp/session_actor/kqp_session_actor.cpp index 741b3099fe9b..8264f7327b2c 100644 --- a/ydb/core/kqp/session_actor/kqp_session_actor.cpp +++ b/ydb/core/kqp/session_actor/kqp_session_actor.cpp @@ -211,7 +211,7 @@ class TKqpSessionActor : public TActorBootstrapped { NWilson::TTraceId id; if (false) { // change to enable Wilson tracing id = NWilson::TTraceId::NewTraceId(15, 4095); - LOG_I("wilson tracing started, id: " + std::to_string(id.GetTraceId())); + LOG_I("wilson tracing started, id: " + id.GetHexTraceId()); } auto selfId = SelfId(); auto as = TActivationContext::ActorSystem(); @@ -1161,7 +1161,7 @@ class TKqpSessionActor : public TActorBootstrapped { ev->Get()->Record.SetQueryPlan(SerializeAnalyzePlan(stats)); } } - + LOG_D("Forwarded TEvExecuterProgress to " << QueryState->RequestActorId); Send(QueryState->RequestActorId, ev->Release().Release(), 0, QueryState->ProxyRequestId); } diff --git a/ydb/core/tablet_flat/flat_exec_seat.h b/ydb/core/tablet_flat/flat_exec_seat.h index cc1f37151d8e..70515168326d 100644 --- a/ydb/core/tablet_flat/flat_exec_seat.h +++ b/ydb/core/tablet_flat/flat_exec_seat.h @@ -37,11 +37,19 @@ namespace NTabletFlatExecutor { void Terminate(ETerminationReason reason, const TActorContext& ctx) noexcept; void CreateEnqueuedSpan() noexcept { - EnqueuedSpan = NWilson::TSpan(TWilsonTablet::Tablet, TxSpan.GetTraceId(), "Tablet.Transaction.Enqueued"); + WaitingSpan = NWilson::TSpan(TWilsonTablet::Tablet, TxSpan.GetTraceId(), "Tablet.Transaction.Enqueued"); } void FinishEnqueuedSpan() noexcept { - EnqueuedSpan.EndOk(); + WaitingSpan.EndOk(); + } + + void CreatePendingSpan() noexcept { + WaitingSpan = NWilson::TSpan(TWilsonTablet::Tablet, TxSpan.GetTraceId(), "Tablet.Transaction.Pending"); + } + + void FinishPendingSpan() noexcept { + WaitingSpan.EndOk(); } NWilson::TTraceId GetTxTraceId() const noexcept { @@ -51,7 +59,7 @@ namespace NTabletFlatExecutor { const ui64 UniqID = Max(); const TAutoPtr Self; NWilson::TSpan TxSpan; - NWilson::TSpan EnqueuedSpan; + NWilson::TSpan WaitingSpan; ui64 Retries = 0; TPinned Pinned; diff --git a/ydb/core/tablet_flat/flat_executor.cpp b/ydb/core/tablet_flat/flat_executor.cpp index b8e95cbd8f1d..c3153b8f859d 100644 --- a/ydb/core/tablet_flat/flat_executor.cpp +++ b/ydb/core/tablet_flat/flat_executor.cpp @@ -73,7 +73,7 @@ class TSharedPageCacheMemTableObserver : public NSharedCache::ISharedPageCacheMe void Register(ui32 table) override { Send(new NSharedCache::TEvMemTableRegister(table)); } - + void Unregister(ui32 table) override { Send(new NSharedCache::TEvMemTableUnregister(table)); } @@ -518,6 +518,7 @@ void TExecutor::PlanTransactionActivation() { const ui64 limitTxInFly = Scheme().Executor.LimitInFlyTx; while (PendingQueue->Head() && (!limitTxInFly || (Stats->TxInFly - Stats->TxPending < limitTxInFly))) { TAutoPtr seat = PendingQueue->Pop(); + seat->FinishPendingSpan(); LWTRACK(TransactionEnqueued, seat->Self->Orbit, seat->UniqID); seat->CreateEnqueuedSpan(); ActivationQueue->Push(seat.Release()); @@ -1575,11 +1576,9 @@ bool TExecutor::CanExecuteTransaction() const { return Stats->IsActive && (Stats->IsFollower || PendingPartSwitches.empty()) && !BrokenTransaction; } -void TExecutor::DoExecute(TAutoPtr self, bool allowImmediate, const TActorContext &ctx) { +void TExecutor::DoExecute(TAutoPtr self, bool allowImmediate, const TActorContext &ctx, NWilson::TTraceId traceId) { Y_ABORT_UNLESS(ActivationQueue, "attempt to execute transaction before activation"); - NWilson::TTraceId traceId; - TAutoPtr seat = new TSeat(++TransactionUniqCounter, self, std::move(traceId)); LWTRACK(TransactionBegin, seat->Self->Orbit, seat->UniqID, Owner->TabletID(), TypeName(*seat->Self)); @@ -1617,6 +1616,7 @@ void TExecutor::DoExecute(TAutoPtr self, bool allowImmediate, cons { LWTRACK(TransactionPending, seat->Self->Orbit, seat->UniqID, CanExecuteTransaction() ? "tx limit reached" : "transactions paused"); + seat->CreatePendingSpan(); PendingQueue->Push(seat.Release()); ++Stats->TxPending; return; @@ -1634,12 +1634,12 @@ void TExecutor::DoExecute(TAutoPtr self, bool allowImmediate, cons ExecuteTransaction(seat, ctx); } -void TExecutor::Execute(TAutoPtr self, const TActorContext &ctx) { - DoExecute(self, true, ctx); +void TExecutor::Execute(TAutoPtr self, const TActorContext &ctx, NWilson::TTraceId traceId) { + DoExecute(self, true, ctx, std::move(traceId)); } -void TExecutor::Enqueue(TAutoPtr self, const TActorContext &ctx) { - DoExecute(self, false, ctx); +void TExecutor::Enqueue(TAutoPtr self, const TActorContext &ctx, NWilson::TTraceId traceId) { + DoExecute(self, false, ctx, std::move(traceId)); } void TExecutor::ExecuteTransaction(TAutoPtr seat, const TActorContext &ctx) { @@ -1659,11 +1659,11 @@ void TExecutor::ExecuteTransaction(TAutoPtr seat, const TActorContext &ct Database->Begin(Stamp(), env); LWTRACK(TransactionExecuteBegin, seat->Self->Orbit, seat->UniqID); - + NWilson::TSpan txExecuteSpan(TWilsonTablet::Tablet, seat->GetTxTraceId(), "Tablet.Transaction.Execute"); const bool done = seat->Self->Execute(txc, ctx.MakeFor(OwnerActorId)); txExecuteSpan.EndOk(); - + LWTRACK(TransactionExecuteEnd, seat->Self->Orbit, seat->UniqID, done); seat->CPUExecTime += cpuTimer.PassedReset(); diff --git a/ydb/core/tablet_flat/flat_executor.h b/ydb/core/tablet_flat/flat_executor.h index 594ccb0dbecd..2d136d7bd957 100644 --- a/ydb/core/tablet_flat/flat_executor.h +++ b/ydb/core/tablet_flat/flat_executor.h @@ -629,9 +629,9 @@ class TExecutor void Boot(TEvTablet::TEvBoot::TPtr &ev, const TActorContext &ctx) override; void Restored(TEvTablet::TEvRestored::TPtr &ev, const TActorContext &ctx) override; void DetachTablet(const TActorContext &ctx) override; - void DoExecute(TAutoPtr transaction, bool allowImmediate, const TActorContext &ctx); - void Execute(TAutoPtr transaction, const TActorContext &ctx) override; - void Enqueue(TAutoPtr transaction, const TActorContext &ctx) override; + void DoExecute(TAutoPtr transaction, bool allowImmediate, const TActorContext &ctx, NWilson::TTraceId traceId); + void Execute(TAutoPtr transaction, const TActorContext &ctx, NWilson::TTraceId traceId = {}) override; + void Enqueue(TAutoPtr transaction, const TActorContext &ctx, NWilson::TTraceId traceId = {}) override; TLeaseCommit* AttachLeaseCommit(TLogCommit* commit, bool force = false); TLeaseCommit* EnsureReadOnlyLease(TMonotonic at); diff --git a/ydb/core/tablet_flat/tablet_flat_executed.cpp b/ydb/core/tablet_flat/tablet_flat_executed.cpp index de09bd2f6bac..895a1c802897 100644 --- a/ydb/core/tablet_flat/tablet_flat_executed.cpp +++ b/ydb/core/tablet_flat/tablet_flat_executed.cpp @@ -29,14 +29,14 @@ IExecutor* TTabletExecutedFlat::CreateExecutor(const TActorContext &ctx) { return Executor(); } -void TTabletExecutedFlat::Execute(TAutoPtr transaction, const TActorContext &ctx) { +void TTabletExecutedFlat::Execute(TAutoPtr transaction, const TActorContext &ctx, NWilson::TTraceId traceId) { Y_UNUSED(ctx); - Execute(transaction); + Execute(transaction, std::move(traceId)); } -void TTabletExecutedFlat::Execute(TAutoPtr transaction) { +void TTabletExecutedFlat::Execute(TAutoPtr transaction, NWilson::TTraceId traceId) { if (transaction) - static_cast(Executor())->Execute(transaction, ExecutorCtx(*TlsActivationContext)); + static_cast(Executor())->Execute(transaction, ExecutorCtx(*TlsActivationContext), std::move(traceId)); } void TTabletExecutedFlat::EnqueueExecute(TAutoPtr transaction) { diff --git a/ydb/core/tablet_flat/tablet_flat_executed.h b/ydb/core/tablet_flat/tablet_flat_executed.h index e1a61e40393e..75d4cd7a0c15 100644 --- a/ydb/core/tablet_flat/tablet_flat_executed.h +++ b/ydb/core/tablet_flat/tablet_flat_executed.h @@ -23,8 +23,8 @@ class TTabletExecutedFlat : public NFlatExecutorSetup::ITablet { IExecutor* Executor() const { return Executor0; } const TInstant StartTime() const { return StartTime0; } - void Execute(TAutoPtr transaction, const TActorContext &ctx); - void Execute(TAutoPtr transaction); + void Execute(TAutoPtr transaction, const TActorContext &ctx, NWilson::TTraceId traceId = {}); + void Execute(TAutoPtr transaction, NWilson::TTraceId traceId = {}); void EnqueueExecute(TAutoPtr transaction); const NTable::TScheme& Scheme() const noexcept; diff --git a/ydb/core/tablet_flat/tablet_flat_executor.h b/ydb/core/tablet_flat/tablet_flat_executor.h index a2f2d425fd23..656e8d1a7679 100644 --- a/ydb/core/tablet_flat/tablet_flat_executor.h +++ b/ydb/core/tablet_flat/tablet_flat_executor.h @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -514,8 +515,8 @@ namespace NFlatExecutorSetup { // all followers had completed log with requested gc-barrier virtual void FollowerGcApplied(ui32 step, TDuration followerSyncDelay) = 0; - virtual void Execute(TAutoPtr transaction, const TActorContext &ctx) = 0; - virtual void Enqueue(TAutoPtr transaction, const TActorContext &ctx) = 0; + virtual void Execute(TAutoPtr transaction, const TActorContext &ctx, NWilson::TTraceId traceId = {}) = 0; + virtual void Enqueue(TAutoPtr transaction, const TActorContext &ctx, NWilson::TTraceId traceId = {}) = 0; virtual void ConfirmReadOnlyLease(TMonotonic at) = 0; virtual void ConfirmReadOnlyLease(TMonotonic at, std::function callback) = 0;