Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion ydb/core/protos/counters_datashard.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ enum ESimpleCounters {
COUNTER_IMMEDIATE_TX_IN_FLY = 4 [(CounterOpts) = {Name: "ImmediateTxInFly"}];
COUNTER_IMMEDIATE_TX_DELAYED = 5 [(CounterOpts) = {Name: "ImmediateTxDelayed"}];
COUNTER_SCAN_TX_COMPLETE_LAG = 6 [(CounterOpts) = {Name: "ScanTxCompleteLag"}];
COUNTER_PROPOSE_QUEUE_SIZE = 7 [(CounterOpts) = {Name: "ProposeQueueSize"}];
COUNTER_TOTAL_PROPOSE_QUEUE_SIZE = 7 [(CounterOpts) = {Name: "TotalProposeQueueSize"}];
COUNTER_SPLIT_SRC_WAIT_TX_IN_FLY = 8 [(CounterOpts) = {Name: "SplitSrcWaitTxInFly"}];
COUNTER_SPLIT_SRC_WAIT_IMMEDIATE_TX_IN_FLY = 9 [(CounterOpts) = {Name: "SplitSrcWaitImmediateTxInFly"}];
COUNTER_MVCC_STATE_CHANGE_WAIT_TX_IN_FLY = 10 [(CounterOpts) = {Name: "MvccStateChangeWaitTxInFly"}];
Expand All @@ -27,6 +27,10 @@ enum ESimpleCounters {
COUNTER_CHANGE_RECORDS_REQUESTED = 17 [(CounterOpts) = {Name: "ChangeRecordsRequested"}];
COUNTER_CHANGE_DELIVERY_LAG = 18 [(CounterOpts) = {Name: "ChangeDeliveryLag"}];
COUNTER_CHANGE_DATA_LAG = 19 [(CounterOpts) = {Name: "ChangeDataLag"}];
COUNTER_MEADIATOR_STATE_QUEUE_SIZE = 20 [(CounterOpts) = {Name: "MediatorStateQueueSize"}];
COUNTER_PROPOSE_QUEUE_SIZE = 21 [(CounterOpts) = {Name: "ProposeQueueSize"}];
COUNTER_DELAYED_PROPOSE_QUEUE_SIZE = 22 [(CounterOpts) = {Name: "DelayedProposeQueueSize"}];
COUNTER_WAITING_TX_QUEUE_SIZE = 23 [(CounterOpts) = {Name: "WaitingTxQueueSize"}];
}

enum ECumulativeCounters {
Expand Down
6 changes: 5 additions & 1 deletion ydb/core/tx/datashard/datashard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2868,8 +2868,12 @@ bool TDataShard::CheckDataTxRejectAndReply(const NEvents::TDataEvents::TEvWrite:
return false;
}
void TDataShard::UpdateProposeQueueSize() const {
SetCounter(COUNTER_PROPOSE_QUEUE_SIZE, MediatorStateWaitingMsgs.size() + ProposeQueue.Size() + DelayedProposeQueue.size() + Pipeline.WaitingTxs());
SetCounter(COUNTER_TOTAL_PROPOSE_QUEUE_SIZE, MediatorStateWaitingMsgs.size() + ProposeQueue.Size() + DelayedProposeQueue.size() + Pipeline.WaitingTxs());
SetCounter(COUNTER_READ_ITERATORS_WAITING, Pipeline.WaitingReadIterators());
SetCounter(COUNTER_MEADIATOR_STATE_QUEUE_SIZE, MediatorStateWaitingMsgs.size());
SetCounter(COUNTER_WAITING_TX_QUEUE_SIZE, Pipeline.WaitingTxs());
SetCounter(COUNTER_PROPOSE_QUEUE_SIZE, ProposeQueue.Size());
SetCounter(COUNTER_DELAYED_PROPOSE_QUEUE_SIZE, DelayedProposeQueue.size());
}

void TDataShard::Handle(TEvDataShard::TEvProposeTransaction::TPtr &ev, const TActorContext &ctx) {
Expand Down