add metric for repair request blockstore misses (#30810)

This commit is contained in:
Jeff Biseda 2023-03-22 15:47:11 -07:00 committed by GitHub
parent 9f3381c771
commit 94b27d8f96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 13 deletions

View File

@ -188,6 +188,7 @@ struct ServeRepairStats {
orphan: usize, orphan: usize,
pong: usize, pong: usize,
ancestor_hashes: usize, ancestor_hashes: usize,
window_index_misses: usize,
ping_cache_check_failed: usize, ping_cache_check_failed: usize,
pings_sent: usize, pings_sent: usize,
decode_time_us: u64, decode_time_us: u64,
@ -381,17 +382,18 @@ impl ServeRepair {
} }
| RepairProtocol::LegacyWindowIndexWithNonce(_, slot, shred_index, nonce) => { | RepairProtocol::LegacyWindowIndexWithNonce(_, slot, shred_index, nonce) => {
stats.window_index += 1; stats.window_index += 1;
( let batch = Self::run_window_request(
Self::run_window_request(
recycler, recycler,
from_addr, from_addr,
blockstore, blockstore,
*slot, *slot,
*shred_index, *shred_index,
*nonce, *nonce,
), );
"WindowIndexWithNonce", if batch.is_none() {
) stats.window_index_misses += 1;
}
(batch, "WindowIndexWithNonce")
} }
RepairProtocol::HighestWindowIndex { RepairProtocol::HighestWindowIndex {
header: RepairRequestHeader { nonce, .. }, header: RepairRequestHeader { nonce, .. },
@ -726,6 +728,7 @@ impl ServeRepair {
i64 i64
), ),
("pong", stats.pong, i64), ("pong", stats.pong, i64),
("window_index_misses", stats.window_index_misses, i64),
( (
"ping_cache_check_failed", "ping_cache_check_failed",
stats.ping_cache_check_failed, stats.ping_cache_check_failed,
@ -1214,8 +1217,6 @@ impl ServeRepair {
from_addr, from_addr,
nonce, nonce,
)?; )?;
inc_new_counter_debug!("serve_repair-window-request-ledger", 1);
Some(PacketBatch::new_unpinned_with_recycler_data( Some(PacketBatch::new_unpinned_with_recycler_data(
recycler, recycler,
"run_window_request", "run_window_request",