records hash of values purged by expired pull-responses (#16800)
process_pull_responses should record hash of values purged by expired responses (as well as unexpired ones): https://github.com/solana-labs/solana/blob/c1829dd00/core/src/crds_gossip_pull.rs#L385-L387 otherwise, these values are not excluded from following pull-requests (from likely different nodes): https://github.com/solana-labs/solana/blob/c1829dd00/core/src/crds_gossip_pull.rs#L447-L452 and would waste bandwidth should they be included in subsequent pull-responses.
This commit is contained in:
parent
0f3ac51cf1
commit
3b8d6b59fb
|
@ -382,8 +382,10 @@ impl CrdsGossipPull {
|
|||
let mut owners = HashSet::new();
|
||||
for r in responses_expired_timeout {
|
||||
let value_hash = r.value_hash;
|
||||
if crds.insert_versioned(r).is_err() {
|
||||
failed_inserts.push(value_hash);
|
||||
match crds.insert_versioned(r) {
|
||||
Ok(None) => (),
|
||||
Ok(Some(old)) => self.purged_values.push_back((old.value_hash, now)),
|
||||
Err(_) => failed_inserts.push(value_hash),
|
||||
}
|
||||
}
|
||||
for r in responses {
|
||||
|
|
Loading…
Reference in New Issue