@@ -14,11 +14,11 @@ using EState = NKikimrPQ::TTransaction::EState;
1414
1515namespace {
1616 struct TTransactionSnapshot {
17- TTransactionSnapshot (const TDistributedTransaction& tx)
17+ explicit TTransactionSnapshot (const TDistributedTransaction& tx)
1818 : TxId(tx.TxId)
1919 , Step(tx.Step)
2020 , State(tx.State)
21- , MinStep(tx.MaxStep )
21+ , MinStep(tx.MinStep )
2222 , MaxStep(tx.MaxStep) {
2323 }
2424
@@ -124,7 +124,7 @@ class TMonitoringProxy : public TActorBootstrapped<TMonitoringProxy> {
124124 }
125125 }
126126 TABLED () {str << tx.Step ;}
127- TABLED () {str << ( int ) tx.State ;}
127+ TABLED () {str << NKikimrPQ::TTransaction_EState_Name ( tx.State ) ;}
128128 TABLED () {str << tx.MinStep ;}
129129 TABLED () {str << tx.MaxStep ;}
130130 }
@@ -243,6 +243,15 @@ bool TPersQueue::OnRenderAppHtmlPage(NMon::TEvRemoteHttpInfo::TPtr ev, const TAc
243243 transactions.emplace_back (tx);
244244 }
245245
246+ auto isLess = [](const TTransactionSnapshot& lhs, const TTransactionSnapshot& rhs) {
247+ auto makeValue = [](const TTransactionSnapshot& v) {
248+ return std::make_tuple (v.Step , v.TxId );
249+ };
250+
251+ return makeValue (lhs) < makeValue (rhs);
252+ };
253+ std::sort (transactions.begin (), transactions.end (), isLess);
254+
246255 ctx.Register (new TMonitoringProxy (ev->Sender , ev->Get ()->Query , std::move (res), CacheActor, TopicName,
247256 TabletID (), ResponseProxy.size (), std::move (config), std::move (transactions)));
248257
0 commit comments