feat(dragonfly-client): add logs for finished piece from local (#1147)

Signed-off-by: Gaius <gaius.qi@gmail.com>
This commit is contained in:
Gaius 2025-05-12 23:47:02 +08:00 committed by GitHub
parent 5bc3a0a6dd
commit c11f533637
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -149,7 +149,7 @@ fn default_download_piece_timeout() -> Duration {
/// default_download_concurrent_piece_count is the default number of concurrent pieces to download. /// default_download_concurrent_piece_count is the default number of concurrent pieces to download.
#[inline] #[inline]
fn default_download_concurrent_piece_count() -> u32 { fn default_download_concurrent_piece_count() -> u32 {
16 8
} }
/// default_download_max_schedule_count is the default max count of schedule. /// default_download_max_schedule_count is the default max count of schedule.

View File

@ -422,6 +422,7 @@ impl Piece {
// If the piece is downloaded by the other thread, // If the piece is downloaded by the other thread,
// return the piece directly. // return the piece directly.
if piece.is_finished() { if piece.is_finished() {
info!("finished piece {} from local", piece_id);
return Ok(piece); return Ok(piece);
} }
@ -525,6 +526,7 @@ impl Piece {
// If the piece is downloaded by the other thread, // If the piece is downloaded by the other thread,
// return the piece directly. // return the piece directly.
if piece.is_finished() { if piece.is_finished() {
info!("finished piece {} from local", piece_id);
return Ok(piece); return Ok(piece);
} }
@ -789,6 +791,7 @@ impl Piece {
// If the piece is downloaded by the other thread, // If the piece is downloaded by the other thread,
// return the piece directly. // return the piece directly.
if piece.is_finished() { if piece.is_finished() {
info!("finished persistent cache piece {} from local", piece_id);
return Ok(piece); return Ok(piece);
} }