Skip to content

Commit

Permalink
Log settlement finality latency outliers (#16353)
Browse files Browse the repository at this point in the history
## Description 

As title

## Test Plan 

CI

---
If your changes are not user-facing and do not break anything, you can
skip the following section. Otherwise, please briefly describe what has
changed under the Release Notes section.

### Type of Change (Check all that apply)

- [ ] protocol change
- [ ] user-visible impact
- [ ] breaking change for a client SDKs
- [ ] breaking change for FNs (FN binary must upgrade)
- [ ] breaking change for validators or node operators (must upgrade
binaries)
- [ ] breaking change for on-chain data layout
- [ ] necessitate either a data wipe or data migration

### Release notes
  • Loading branch information
lxfind authored Feb 23, 2024
1 parent 10db6b0 commit e26b1da
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion crates/sui-core/src/quorum_driver/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,7 @@ where
return;
}
};
let settlement_finality_latency = timer.elapsed().as_secs_f64();
quorum_driver
.metrics
.settlement_finality_latency
Expand All @@ -777,7 +778,14 @@ where
} else {
TX_TYPE_SHARED_OBJ_TX
}])
.observe(timer.elapsed().as_secs_f64());
.observe(settlement_finality_latency);
if settlement_finality_latency >= 8.0 || settlement_finality_latency <= 0.1 {
debug!(
?tx_digest,
"Settlement finality latency is out of expected range: {}",
settlement_finality_latency
);
}

quorum_driver.notify(&transaction, &Ok(response), old_retry_times + 1);
}
Expand Down

0 comments on commit e26b1da

Please sign in to comment.