parent
256d9042d3
commit
7c23625193
@ -1226,22 +1226,39 @@ impl<AppReqId: ReqId, TSpec: EthSpec> Network<AppReqId, TSpec> {
|
|||||||
.publish(Topic::from(topic.clone()), data)
|
.publish(Topic::from(topic.clone()), data)
|
||||||
{
|
{
|
||||||
Ok(_) => {
|
Ok(_) => {
|
||||||
warn!(self.log, "Gossip message published on retry"; "topic" => topic_str);
|
debug!(
|
||||||
if let Some(v) = metrics::get_int_counter(
|
self.log,
|
||||||
|
"Gossip message published on retry";
|
||||||
|
"topic" => topic_str
|
||||||
|
);
|
||||||
|
metrics::inc_counter_vec(
|
||||||
&metrics::GOSSIP_LATE_PUBLISH_PER_TOPIC_KIND,
|
&metrics::GOSSIP_LATE_PUBLISH_PER_TOPIC_KIND,
|
||||||
&[topic_str],
|
&[topic_str],
|
||||||
) {
|
);
|
||||||
v.inc()
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
Err(e) => {
|
Err(PublishError::Duplicate) => {
|
||||||
warn!(self.log, "Gossip message publish failed on retry"; "topic" => topic_str, "error" => %e);
|
debug!(
|
||||||
if let Some(v) = metrics::get_int_counter(
|
self.log,
|
||||||
|
"Gossip message publish ignored on retry";
|
||||||
|
"reason" => "duplicate",
|
||||||
|
"topic" => topic_str
|
||||||
|
);
|
||||||
|
metrics::inc_counter_vec(
|
||||||
&metrics::GOSSIP_FAILED_LATE_PUBLISH_PER_TOPIC_KIND,
|
&metrics::GOSSIP_FAILED_LATE_PUBLISH_PER_TOPIC_KIND,
|
||||||
&[topic_str],
|
&[topic_str],
|
||||||
) {
|
);
|
||||||
v.inc()
|
}
|
||||||
};
|
Err(e) => {
|
||||||
|
warn!(
|
||||||
|
self.log,
|
||||||
|
"Gossip message publish failed on retry";
|
||||||
|
"topic" => topic_str,
|
||||||
|
"error" => %e
|
||||||
|
);
|
||||||
|
metrics::inc_counter_vec(
|
||||||
|
&metrics::GOSSIP_FAILED_LATE_PUBLISH_PER_TOPIC_KIND,
|
||||||
|
&[topic_str],
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user