@@ -2223,12 +2223,12 @@ bool TDataShard::OnRenderAppHtmlPage(NMon::TEvRemoteHttpInfo::TPtr ev, const TAc
22232223
22242224 if (const auto & action = cgi.Get (" action" )) {
22252225 if (action == " cleanup-borrowed-parts" ) {
2226- Execute ( CreateTxMonitoringCleanupBorrowedParts ( this , ev), ctx );
2226+ HandleMonCleanupBorrowedParts (ev );
22272227 return true ;
22282228 }
22292229
22302230 if (action == " reset-schema-version" ) {
2231- Execute ( CreateTxMonitoringResetSchemaVersion ( this , ev), ctx );
2231+ HandleMonResetSchemaVersion (ev );
22322232 return true ;
22332233 }
22342234
@@ -2254,13 +2254,16 @@ bool TDataShard::OnRenderAppHtmlPage(NMon::TEvRemoteHttpInfo::TPtr ev, const TAc
22542254 ctx.Send (ev->Sender , new NMon::TEvRemoteHttpInfoRes (" Change sender is not running" ));
22552255 return true ;
22562256 }
2257+ } else if (page == " volatile-txs" ) {
2258+ HandleMonVolatileTxs (ev);
2259+ return true ;
22572260 } else {
22582261 ctx.Send (ev->Sender , new NMon::TEvRemoteBinaryInfoRes (NMonitoring::HTTPNOTFOUND));
22592262 return true ;
22602263 }
22612264 }
22622265
2263- Execute ( CreateTxMonitoring ( this , ev), ctx );
2266+ HandleMonIndexPage (ev );
22642267 return true ;
22652268}
22662269
@@ -4181,60 +4184,6 @@ void TDataShard::Handle(TEvSchemeShard::TEvDescribeSchemeResult::TPtr ev, const
41814184 Execute (new TTxStoreTablePath (this , pathId, rec.GetPath ()), ctx);
41824185}
41834186
4184- void TDataShard::Handle (TEvDataShard::TEvGetInfoRequest::TPtr &ev,
4185- const TActorContext &ctx)
4186- {
4187- Execute (CreateTxGetInfo (this , ev), ctx);
4188- }
4189-
4190- void TDataShard::Handle (TEvDataShard::TEvListOperationsRequest::TPtr &ev,
4191- const TActorContext &ctx)
4192- {
4193- Execute (CreateTxListOperations (this , ev), ctx);
4194- }
4195-
4196- void TDataShard::Handle (TEvDataShard::TEvGetOperationRequest::TPtr &ev,
4197- const TActorContext &ctx)
4198- {
4199- Execute (CreateTxGetOperation (this , ev), ctx);
4200- }
4201-
4202- void TDataShard::Handle (TEvDataShard::TEvGetDataHistogramRequest::TPtr &ev,
4203- const TActorContext &ctx)
4204- {
4205- auto *response = new TEvDataShard::TEvGetDataHistogramResponse;
4206- response->Record .MutableStatus ()->SetCode (Ydb::StatusIds::SUCCESS);
4207- const auto & rec = ev->Get ()->Record ;
4208-
4209- if (rec.GetCollectKeySampleMs () > 0 ) {
4210- EnableKeyAccessSampling (ctx,
4211- AppData (ctx)->TimeProvider ->Now () + TDuration::MilliSeconds (rec.GetCollectKeySampleMs ()));
4212- }
4213-
4214- if (rec.GetActualData ()) {
4215- if (CurrentKeySampler == DisabledKeySampler) {
4216- // datashard stores expired stats
4217- ctx.Send (ev->Sender , response);
4218- return ;
4219- }
4220- }
4221-
4222- for (const auto &pr : TableInfos) {
4223- const auto &tinfo = *pr.second ;
4224- const NTable::TStats &stats = tinfo.Stats .DataStats ;
4225-
4226- auto &hist = *response->Record .AddTableHistograms ();
4227- hist.SetTableName (pr.second ->Name );
4228- for (ui32 ki : tinfo.KeyColumnIds )
4229- hist.AddKeyNames (tinfo.Columns .FindPtr (ki)->Name );
4230- SerializeHistogram (tinfo, stats.DataSizeHistogram , *hist.MutableSizeHistogram ());
4231- SerializeHistogram (tinfo, stats.RowCountHistogram , *hist.MutableCountHistogram ());
4232- SerializeKeySample (tinfo, tinfo.Stats .AccessStats , *hist.MutableKeyAccessSample ());
4233- }
4234-
4235- ctx.Send (ev->Sender , response);
4236- }
4237-
42384187void TDataShard::Handle (TEvDataShard::TEvGetReadTableSinkStateRequest::TPtr &ev,
42394188 const TActorContext &ctx)
42404189{
@@ -4329,60 +4278,6 @@ void TDataShard::Handle(TEvDataShard::TEvGetReadTableStreamStateRequest::TPtr &e
43294278 ctx.Send (ev->Forward (tx->GetStreamSink ()));
43304279}
43314280
4332- void TDataShard::Handle (TEvDataShard::TEvGetRSInfoRequest::TPtr &ev,
4333- const TActorContext &ctx)
4334- {
4335- auto *response = new TEvDataShard::TEvGetRSInfoResponse;
4336- response->Record .MutableStatus ()->SetCode (Ydb::StatusIds::SUCCESS);
4337-
4338- for (auto &pr : OutReadSets.CurrentReadSets ) {
4339- auto &rs = *response->Record .AddOutReadSets ();
4340- rs.SetTxId (pr.second .TxId );
4341- rs.SetOrigin (pr.second .Origin );
4342- rs.SetSource (pr.second .From );
4343- rs.SetDestination (pr.second .To );
4344- rs.SetSeqNo (pr.first );
4345- }
4346-
4347- for (auto &p : OutReadSets.ReadSetAcks ) {
4348- auto &rec = p->Record ;
4349- auto &ack = *response->Record .AddOutRSAcks ();
4350- ack.SetTxId (rec.GetTxId ());
4351- ack.SetStep (rec.GetStep ());
4352- ack.SetOrigin (rec.GetTabletConsumer ());
4353- ack.SetSource (rec.GetTabletSource ());
4354- ack.SetDestination (rec.GetTabletDest ());
4355- ack.SetSeqNo (rec.GetSeqno ());
4356- }
4357-
4358- for (auto &pr : Pipeline.GetDelayedAcks ()) {
4359- for (auto &ack : pr.second ) {
4360- auto *ev = ack->CastAsLocal <TEvTxProcessing::TEvReadSetAck>();
4361- if (ev) {
4362- auto &rec = ev->Record ;
4363- auto &ack = *response->Record .AddDelayedRSAcks ();
4364- ack.SetTxId (rec.GetTxId ());
4365- ack.SetStep (rec.GetStep ());
4366- ack.SetOrigin (rec.GetTabletConsumer ());
4367- ack.SetSource (rec.GetTabletSource ());
4368- ack.SetDestination (rec.GetTabletDest ());
4369- ack.SetSeqNo (rec.GetSeqno ());
4370- }
4371- }
4372- }
4373-
4374- ctx.Send (ev->Sender , response);
4375- }
4376-
4377- void TDataShard::Handle (TEvDataShard::TEvGetSlowOpProfilesRequest::TPtr &ev,
4378- const TActorContext &ctx)
4379- {
4380- auto *response = new TEvDataShard::TEvGetSlowOpProfilesResponse;
4381- response->Record .MutableStatus ()->SetCode (Ydb::StatusIds::SUCCESS);
4382- Pipeline.FillStoredExecutionProfiles (response->Record );
4383- ctx.Send (ev->Sender , response);
4384- }
4385-
43864281void TDataShard::Handle (TEvDataShard::TEvRefreshVolatileSnapshotRequest::TPtr& ev, const TActorContext& ctx) {
43874282 Execute (new TTxRefreshVolatileSnapshot (this , std::move (ev)), ctx);
43884283}
0 commit comments