/// The method processes a timed-out chunk.
The method processes a timed-out chunk.
The method processes a timed - out chunk .
fn process_timed_out_chunk(
        &self,
        node_id: &NodeId,
        artifact_id: ArtifactId,
        integrity_hash: CryptoHash,
        chunk_id: ChunkId,
    ) {
        // Drop it and switch the preferred primary so that the next node that
        // advertised the chunk picks it up.
        let _ = self
            .prioritizer
            .get_advert_tracker(&artifact_id, &integrity_hash)
            .map(|advert_tracker| {
                // unset the in-progress flag.
                let mut advert_tracker = advert_tracker.write().unwrap();
                advert_tracker.unset_in_progress(chunk_id);
                // If we have exhausted a round of download attempts (i.e., each peer that
                // advertised it has timed out once), then reset the attempts
                // history so that peers can be probed once for the next round.
                if advert_tracker.is_attempts_round_complete(chunk_id) {
                    advert_tracker.attempts_round_reset(chunk_id)
                }
            });
        #[rustfmt::skip]
        trace!(self.log, "Timed-out: Peer{:?} Artifact{:?} Chunk{:?}",
               node_id, chunk_id, artifact_id);
    }
fn process_timed_out_chunk ( & self , node_id : & NodeId , artifact_id : ArtifactId , integrity_hash : CryptoHash , chunk_id : ChunkId , ) { // Drop it and switch the preferred primary so that the next node that // advertised the chunk picks it up. let _ = self . prioritizer . get_advert_tracker ( & artifact_id , & integrity_hash ) . map ( | advert_tracker | { // unset the in-progress flag. let mut advert_tracker = advert_tracker . write ( ) . unwrap ( ) ; advert_tracker . unset_in_progress ( chunk_id ) ; // If we have exhausted a round of download attempts (i.e., each peer that // advertised it has timed out once), then reset the attempts // history so that peers can be probed once for the next round. if advert_tracker . is_attempts_round_complete ( chunk_id ) { advert_tracker . attempts_round_reset ( chunk_id ) } } ) ; # [ rustfmt :: skip ] trace ! ( self log " " node_id chunk_id artifact_id ) ; }
The method processes a timed-out chunk.
The method processes a timed - out chunk .
&self
node_id
&NodeId
artifact_id
ArtifactId
integrity_hash
CryptoHash
chunk_id
ChunkId