You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if sender.send(UnvalidatedArtifactMutation::Insert((message, peer_id))).is_err(){
482
+
// Sends artifact to the pool. In theory this channel can get full if there is a bug in consensus and each round takes very long time.
483
+
// However, the duration of this await is not IO-bound so for the time being it is fine that sending over the channel is not done as
484
+
// part of a select.
485
+
if sender.send(UnvalidatedArtifactMutation::Insert((message, peer_id))).await.is_err(){
486
+
485
487
error!(log,"The receiving side of the channel, owned by the consensus thread, was closed. This should be infallible situation since a cancellation token should be received. If this happens then most likely there is very subnet synchonization bug.");
486
488
}
487
489
488
490
// wait for deletion from peers
489
491
// TODO: NET-1774
490
492
let _ = peer_rx.wait_for(|p| p.is_empty()).await;
491
493
492
-
// Purge from the unvalidated pool
493
-
if sender.send(UnvalidatedArtifactMutation::Remove(id)).is_err(){
494
+
// Purge artifact from the unvalidated pool. In theory this channel can get full if there is a bug in consensus and each round takes very long time.
495
+
// However, the duration of this await is not IO-bound so for the time being it is fine that sending over the channel is not done as
496
+
// part of a select.
497
+
if sender.send(UnvalidatedArtifactMutation::Remove(id)).await.is_err(){
494
498
error!(log,"The receiving side of the channel, owned by the consensus thread, was closed. This should be infallible situation since a cancellation token should be received. If this happens then most likely there is very subnet synchonization bug.");
495
499
}
496
500
metrics
@@ -596,7 +600,7 @@ mod tests {
596
600
use ic_test_utilities_logger::with_test_replica_logger;
597
601
use ic_types::{artifact::IdentifiableArtifact,RegistryVersion};
598
602
use ic_types_test_utils::ids::{NODE_1,NODE_2};
599
-
use tokio::{sync::mpsc::UnboundedReceiver,time::timeout};
0 commit comments