File tree Expand file tree Collapse file tree 3 files changed +19
-2
lines changed
rs/p2p/consensus_manager/src Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ pub(crate) struct ConsensusManagerMetrics {
41
41
pub send_view_consensus_dup_purge_total : IntCounter ,
42
42
pub send_view_send_to_peer_total : IntCounter ,
43
43
pub send_view_send_to_peer_delivered_total : IntCounter ,
44
+ pub send_view_resend_reconnect_total : IntCounter ,
44
45
45
46
// Slot manager
46
47
pub slot_manager_used_slots : IntGauge ,
@@ -240,6 +241,14 @@ impl ConsensusManagerMetrics {
240
241
) )
241
242
. unwrap ( ) ,
242
243
) ,
244
+ send_view_resend_reconnect_total : metrics_registry. register (
245
+ IntCounter :: with_opts ( opts ! (
246
+ "ic_consensus_manager_send_view_resend_reconnect_total" ,
247
+ "Artifact was sent again due to reconnection." ,
248
+ const_labels. clone( ) ,
249
+ ) )
250
+ . unwrap ( ) ,
251
+ ) ,
243
252
244
253
slot_manager_used_slots : metrics_registry. register (
245
254
IntGauge :: with_opts ( opts ! (
Original file line number Diff line number Diff line change @@ -561,7 +561,7 @@ where
561
561
. await ?;
562
562
}
563
563
564
- timer. stop_and_discard ( ) ;
564
+ timer. stop_and_record ( ) ;
565
565
566
566
result
567
567
}
Original file line number Diff line number Diff line change @@ -204,7 +204,15 @@ impl<Artifact: ArtifactKind> ConsensusManagerSender<Artifact> {
204
204
// spawn task for peers with higher conn id or not in completed transmissions.
205
205
// add task to join map
206
206
for ( peer, connection_id) in transport. peers( ) {
207
- let is_initiated = initiated_transmissions. get( & peer) . is_some_and( |c| * c == connection_id) ;
207
+ let is_initiated = initiated_transmissions. get( & peer) . is_some_and( |c| {
208
+ if * c == connection_id {
209
+ true
210
+ } else {
211
+ metrics. send_view_resend_reconnect_total. inc( ) ;
212
+ false
213
+ }
214
+ } ) ;
215
+
208
216
209
217
if !is_initiated {
210
218
metrics. send_view_send_to_peer_total. inc( ) ;
You can’t perform that action at this time.
0 commit comments