Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track cancelled transaction count #17910

Merged
merged 1 commit into from
May 26, 2024
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: 6 additions & 0 deletions crates/sui-core/src/authority.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ pub struct AuthorityMetrics {
pub consensus_handler_scores: IntGaugeVec,
pub consensus_handler_deferred_transactions: IntCounter,
pub consensus_handler_congested_transactions: IntCounter,
pub consensus_handler_cancelled_transactions: IntCounter,
pub consensus_committed_subdags: IntCounterVec,
pub consensus_committed_messages: IntGaugeVec,
pub consensus_committed_user_transactions: IntGaugeVec,
Expand Down Expand Up @@ -663,6 +664,11 @@ impl AuthorityMetrics {
"Number of transactions deferred by consensus handler due to congestion",
registry,
).unwrap(),
consensus_handler_cancelled_transactions: register_int_counter_with_registry!(
"consensus_handler_cancelled_transactions",
"Number of transactions cancelled by consensus handler",
registry,
).unwrap(),
consensus_committed_subdags: register_int_counter_vec_with_registry!(
"consensus_committed_subdags",
"Number of committed subdags, sliced by author",
Expand Down
3 changes: 3 additions & 0 deletions crates/sui-core/src/authority/authority_per_epoch_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2925,6 +2925,9 @@ impl AuthorityPerEpochStore {
authority_metrics
.consensus_handler_deferred_transactions
.inc_by(total_deferred_txns as u64);
authority_metrics
.consensus_handler_cancelled_transactions
.inc_by(cancelled_txns.len() as u64);

if randomness_state_updated {
if let Some(randomness_manager) = randomness_manager.as_mut() {
Expand Down
Loading