44#include " tablet_flat_executor.h"
55#include " flat_sausagecache.h"
66
7+ #include < util/generic/intrlist.h>
78#include < util/generic/ptr.h>
89#include < util/system/hp_timer.h>
910#include < ydb/library/actors/wilson/wilson_span.h>
1213namespace NKikimr {
1314namespace NTabletFlatExecutor {
1415
15- struct TSeat {
16+ enum class ESeatState {
17+ None,
18+ Pending,
19+ Active,
20+ ActiveLow,
21+ Postponed,
22+ Waiting,
23+ Done,
24+ };
25+
26+ struct TSeat : public TIntrusiveListItem <TSeat> {
1627 using TPinned = THashMap<TLogoBlobID, THashMap<ui32, TIntrusivePtr<TPrivatePageCachePinPad>>>;
1728
1829 TSeat (const TSeat&) = delete ;
@@ -30,9 +41,11 @@ namespace NTabletFlatExecutor {
3041 out << " }" ;
3142 }
3243
33- void Complete (const TActorContext& ctx, bool isRW) noexcept ;
44+ bool IsTerminated () const {
45+ return TerminationReason != ETerminationReason::None;
46+ }
3447
35- void Terminate (ETerminationReason reason, const TActorContext& ctx) noexcept ;
48+ void Complete ( const TActorContext& ctx, bool isRW ) noexcept ;
3649
3750 void StartEnqueuedSpan () noexcept {
3851 WaitingSpan = NWilson::TSpan (TWilsonTablet::TabletDetailed, Self->TxSpan .GetTraceId (), " Tablet.Transaction.Enqueued" );
@@ -54,7 +67,7 @@ namespace NTabletFlatExecutor {
5467 return Self->TxSpan .GetTraceId ();
5568 }
5669
57- const ui64 UniqID = Max<ui64>() ;
70+ const ui64 UniqID;
5871 const TAutoPtr<ITransaction> Self;
5972 NWilson::TSpan WaitingSpan;
6073 ui64 Retries = 0 ;
@@ -74,6 +87,10 @@ namespace NTabletFlatExecutor {
7487 ui32 NotEnoughMemoryCount = 0 ;
7588 ui64 TaskId = 0 ;
7689
90+ ESeatState State = ESeatState::Done;
91+ bool LowPriority = false ;
92+ bool Cancelled = false ;
93+
7794 TAutoPtr<TMemoryToken> AttachedMemory;
7895 TIntrusivePtr<TMemoryGCToken> CapturedMemory;
7996 TVector<std::function<void ()>> OnPersistent;
0 commit comments