remove redundant pubkey update record (#33722)
* remove redundant pubkey update record * from became unused, so removed from all process_pull_response() calls
This commit is contained in:
parent
5de9163625
commit
6efc7ec61d
|
@ -2184,7 +2184,6 @@ impl ClusterInfo {
|
||||||
{
|
{
|
||||||
let _st = ScopedTimer::from(&self.stats.process_pull_response);
|
let _st = ScopedTimer::from(&self.stats.process_pull_response);
|
||||||
self.gossip.process_pull_responses(
|
self.gossip.process_pull_responses(
|
||||||
from,
|
|
||||||
filtered_pulls,
|
filtered_pulls,
|
||||||
filtered_pulls_expired_timeout,
|
filtered_pulls_expired_timeout,
|
||||||
failed_inserts,
|
failed_inserts,
|
||||||
|
|
|
@ -274,7 +274,6 @@ impl CrdsGossip {
|
||||||
/// Process a pull response.
|
/// Process a pull response.
|
||||||
pub fn process_pull_responses(
|
pub fn process_pull_responses(
|
||||||
&self,
|
&self,
|
||||||
from: &Pubkey,
|
|
||||||
responses: Vec<CrdsValue>,
|
responses: Vec<CrdsValue>,
|
||||||
responses_expired_timeout: Vec<CrdsValue>,
|
responses_expired_timeout: Vec<CrdsValue>,
|
||||||
failed_inserts: Vec<Hash>,
|
failed_inserts: Vec<Hash>,
|
||||||
|
@ -283,7 +282,6 @@ impl CrdsGossip {
|
||||||
) {
|
) {
|
||||||
self.pull.process_pull_responses(
|
self.pull.process_pull_responses(
|
||||||
&self.crds,
|
&self.crds,
|
||||||
from,
|
|
||||||
responses,
|
responses,
|
||||||
responses_expired_timeout,
|
responses_expired_timeout,
|
||||||
failed_inserts,
|
failed_inserts,
|
||||||
|
|
|
@ -360,7 +360,6 @@ impl CrdsGossipPull {
|
||||||
pub(crate) fn process_pull_responses(
|
pub(crate) fn process_pull_responses(
|
||||||
&self,
|
&self,
|
||||||
crds: &RwLock<Crds>,
|
crds: &RwLock<Crds>,
|
||||||
from: &Pubkey,
|
|
||||||
responses: Vec<CrdsValue>,
|
responses: Vec<CrdsValue>,
|
||||||
responses_expired_timeout: Vec<CrdsValue>,
|
responses_expired_timeout: Vec<CrdsValue>,
|
||||||
failed_inserts: Vec<Hash>,
|
failed_inserts: Vec<Hash>,
|
||||||
|
@ -382,7 +381,6 @@ impl CrdsGossipPull {
|
||||||
}
|
}
|
||||||
stats.success += num_inserts;
|
stats.success += num_inserts;
|
||||||
self.num_pulls.fetch_add(num_inserts, Ordering::Relaxed);
|
self.num_pulls.fetch_add(num_inserts, Ordering::Relaxed);
|
||||||
owners.insert(*from);
|
|
||||||
for owner in owners {
|
for owner in owners {
|
||||||
crds.update_record_timestamp(&owner, now);
|
crds.update_record_timestamp(&owner, now);
|
||||||
}
|
}
|
||||||
|
@ -543,7 +541,6 @@ impl CrdsGossipPull {
|
||||||
fn process_pull_response(
|
fn process_pull_response(
|
||||||
&self,
|
&self,
|
||||||
crds: &RwLock<Crds>,
|
crds: &RwLock<Crds>,
|
||||||
from: &Pubkey,
|
|
||||||
timeouts: &CrdsTimeouts,
|
timeouts: &CrdsTimeouts,
|
||||||
response: Vec<CrdsValue>,
|
response: Vec<CrdsValue>,
|
||||||
now: u64,
|
now: u64,
|
||||||
|
@ -553,7 +550,6 @@ impl CrdsGossipPull {
|
||||||
self.filter_pull_responses(crds, timeouts, response, now, &mut stats);
|
self.filter_pull_responses(crds, timeouts, response, now, &mut stats);
|
||||||
self.process_pull_responses(
|
self.process_pull_responses(
|
||||||
crds,
|
crds,
|
||||||
from,
|
|
||||||
versioned,
|
versioned,
|
||||||
versioned_expired_timeout,
|
versioned_expired_timeout,
|
||||||
failed_inserts,
|
failed_inserts,
|
||||||
|
@ -1196,7 +1192,6 @@ pub(crate) mod tests {
|
||||||
let failed = node
|
let failed = node
|
||||||
.process_pull_response(
|
.process_pull_response(
|
||||||
&node_crds,
|
&node_crds,
|
||||||
&node_pubkey,
|
|
||||||
&node.make_timeouts(node_pubkey, &HashMap::new(), Duration::default()),
|
&node.make_timeouts(node_pubkey, &HashMap::new(), Duration::default()),
|
||||||
rsp.into_iter().flatten().collect(),
|
rsp.into_iter().flatten().collect(),
|
||||||
1,
|
1,
|
||||||
|
@ -1375,13 +1370,7 @@ pub(crate) mod tests {
|
||||||
);
|
);
|
||||||
// inserting a fresh value should be fine.
|
// inserting a fresh value should be fine.
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
node.process_pull_response(
|
node.process_pull_response(&node_crds, &timeouts, vec![peer_entry.clone()], 1,)
|
||||||
&node_crds,
|
|
||||||
&peer_pubkey,
|
|
||||||
&timeouts,
|
|
||||||
vec![peer_entry.clone()],
|
|
||||||
1,
|
|
||||||
)
|
|
||||||
.0,
|
.0,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
@ -1394,7 +1383,6 @@ pub(crate) mod tests {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
node.process_pull_response(
|
node.process_pull_response(
|
||||||
&node_crds,
|
&node_crds,
|
||||||
&peer_pubkey,
|
|
||||||
&timeouts,
|
&timeouts,
|
||||||
vec![peer_entry.clone(), unstaked_peer_entry],
|
vec![peer_entry.clone(), unstaked_peer_entry],
|
||||||
node.crds_timeout + 100,
|
node.crds_timeout + 100,
|
||||||
|
@ -1408,7 +1396,6 @@ pub(crate) mod tests {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
node.process_pull_response(
|
node.process_pull_response(
|
||||||
&node_crds,
|
&node_crds,
|
||||||
&peer_pubkey,
|
|
||||||
&timeouts,
|
&timeouts,
|
||||||
vec![peer_entry],
|
vec![peer_entry],
|
||||||
node.crds_timeout + 1,
|
node.crds_timeout + 1,
|
||||||
|
@ -1425,7 +1412,6 @@ pub(crate) mod tests {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
node.process_pull_response(
|
node.process_pull_response(
|
||||||
&node_crds,
|
&node_crds,
|
||||||
&peer_pubkey,
|
|
||||||
&timeouts,
|
&timeouts,
|
||||||
vec![peer_vote.clone()],
|
vec![peer_vote.clone()],
|
||||||
node.crds_timeout + 1,
|
node.crds_timeout + 1,
|
||||||
|
@ -1439,7 +1425,6 @@ pub(crate) mod tests {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
node.process_pull_response(
|
node.process_pull_response(
|
||||||
&node_crds,
|
&node_crds,
|
||||||
&peer_pubkey,
|
|
||||||
&timeouts,
|
&timeouts,
|
||||||
vec![peer_vote],
|
vec![peer_vote],
|
||||||
node.crds_timeout + 2,
|
node.crds_timeout + 2,
|
||||||
|
|
|
@ -575,7 +575,6 @@ fn network_run_pull(
|
||||||
.gossip
|
.gossip
|
||||||
.filter_pull_responses(&timeouts, rsp, now, &mut stats);
|
.filter_pull_responses(&timeouts, rsp, now, &mut stats);
|
||||||
node.gossip.process_pull_responses(
|
node.gossip.process_pull_responses(
|
||||||
&from,
|
|
||||||
vers,
|
vers,
|
||||||
vers_expired_timeout,
|
vers_expired_timeout,
|
||||||
failed_inserts,
|
failed_inserts,
|
||||||
|
|
Loading…
Reference in New Issue