retains hash value of outdated responses received from pull requests (#12513)
pull_response_fail_inserts has been increasing: https://cdn.discordapp.com/attachments/478692221441409024/759096187587657778/pull_response_fail_insert.png but for outdated values which fail to insert: https://github.com/solana-labs/solana/blob/a5c3fc14b3/core/src/crds_gossip_pull.rs#L332-L344 https://github.com/solana-labs/solana/blob/a5c3fc14b3/core/src/crds.rs#L104-L108 are not recorded anywhere, and so the next pull request may obtain the same redundant payload again, unnecessary taking bandwidth. This commit holds on to the hashes of failed-inserts for a while, similar to purged_values: https://github.com/solana-labs/solana/blob/a5c3fc14b3/core/src/crds_gossip_pull.rs#L380 and filter them out for the next pull request: https://github.com/solana-labs/solana/blob/a5c3fc14b3/core/src/crds_gossip_pull.rs#L204
This commit is contained in:
@@ -459,9 +459,16 @@ fn network_run_pull(
|
||||
let mut node = node.lock().unwrap();
|
||||
node.mark_pull_request_creation_time(&from, now);
|
||||
let mut stats = ProcessPullStats::default();
|
||||
let (vers, vers_expired_timeout) =
|
||||
let (vers, vers_expired_timeout, failed_inserts) =
|
||||
node.filter_pull_responses(&timeouts, rsp, now, &mut stats);
|
||||
node.process_pull_responses(&from, vers, vers_expired_timeout, now, &mut stats);
|
||||
node.process_pull_responses(
|
||||
&from,
|
||||
vers,
|
||||
vers_expired_timeout,
|
||||
failed_inserts,
|
||||
now,
|
||||
&mut stats,
|
||||
);
|
||||
overhead += stats.failed_insert;
|
||||
overhead += stats.failed_timeout;
|
||||
}
|
||||
|
Reference in New Issue
Block a user