Skip to content

Commit

Permalink
Revert "Add metric measuring number of successfully inserted push mes…
Browse files Browse the repository at this point in the history
…sages (solana-labs#20275)"

This reverts commit 9af1dfe.
  • Loading branch information
frits-metalogix authored Nov 24, 2021
1 parent 9968635 commit 278a50d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 28 deletions.
7 changes: 1 addition & 6 deletions gossip/src/cluster_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2181,12 +2181,7 @@ impl ClusterInfo {
messages
.into_iter()
.flat_map(|(from, crds_values)| {
let (num_success, origins) =
self.gossip.process_push_message(&from, crds_values, now);
self.stats
.process_push_success
.add_relaxed(num_success as u64);
origins
self.gossip.process_push_message(&from, crds_values, now)
})
.collect()
};
Expand Down
6 changes: 0 additions & 6 deletions gossip/src/cluster_info_metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ pub(crate) struct GossipStats {
pub(crate) process_pull_response_success: Counter,
pub(crate) process_pull_response_timeout: Counter,
pub(crate) process_push_message: Counter,
pub(crate) process_push_success: Counter,
pub(crate) prune_message_count: Counter,
pub(crate) prune_message_len: Counter,
pub(crate) prune_received_cache: Counter,
Expand Down Expand Up @@ -200,11 +199,6 @@ pub(crate) fn submit_gossip_stats(
("repair_peers", stats.repair_peers.clear(), i64),
("new_push_requests", stats.new_push_requests.clear(), i64),
("new_push_requests2", stats.new_push_requests2.clear(), i64),
(
"process_push_success",
stats.process_push_success.clear(),
i64
),
("purge", stats.purge.clear(), i64),
(
"process_gossip_packets_time",
Expand Down
20 changes: 5 additions & 15 deletions gossip/src/crds_gossip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,12 @@ impl CrdsGossip {
from: &Pubkey,
values: Vec<CrdsValue>,
now: u64,
) -> (usize, HashSet<Pubkey>) {
let results = self
.push
.process_push_message(&self.crds, from, values, now);
let mut success_count = 0;
let successfully_inserted_origin_set: HashSet<Pubkey> = results
) -> HashSet<Pubkey> {
self.push
.process_push_message(&self.crds, from, values, now)
.into_iter()
.filter_map(|result| {
if result.is_ok() {
success_count += 1;
}
Result::ok(result)
})
.collect();

(success_count, successfully_inserted_origin_set)
.filter_map(Result::ok)
.collect()
}

/// Remove redundant paths in the network.
Expand Down
1 change: 0 additions & 1 deletion gossip/tests/crds_gossip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@ fn network_run_push(
.unwrap()
.gossip
.process_push_message(&from, msgs.clone(), now)
.1
.into_iter()
.collect();
let prunes_map = network
Expand Down

0 comments on commit 278a50d

Please sign in to comment.