Skip to content

Conversation

gaius-qi
Copy link
Member

Description

This pull request simplifies the timeout handling logic in the DfdaemonDownload implementation by removing the custom timeout parsing logic and defaulting to the configured piece_timeout value.

Simplification of timeout handling:

  • Removed the logic for parsing and validating a custom timeout from the request, including error handling and metrics collection for invalid timeouts. The implementation now directly uses the piece_timeout value from the configuration (self.config.download.piece_timeout). (dragonfly-client/src/grpc/dfdaemon_download.rs, dragonfly-client/src/grpc/dfdaemon_download.rsL770-L780)
  • Updated the timeout field in the backend.head call to always use the configured piece_timeout, ensuring consistent timeout behavior. (dragonfly-client/src/grpc/dfdaemon_download.rs, dragonfly-client/src/grpc/dfdaemon_download.rsL792-R781)

Related Issue

Motivation and Context

Screenshots (if appropriate)

Signed-off-by: Gaius <gaius.qi@gmail.com>
@gaius-qi gaius-qi added this to the v2.4.0 milestone Jul 24, 2025
@gaius-qi gaius-qi self-assigned this Jul 24, 2025
@gaius-qi gaius-qi requested a review from a team as a code owner July 24, 2025 09:31
@gaius-qi gaius-qi added the enhancement New feature or request label Jul 24, 2025
Copy link
Contributor

@LunaWhispers LunaWhispers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@LunaWhispers LunaWhispers enabled auto-merge (squash) July 24, 2025 09:32
@LunaWhispers LunaWhispers merged commit 777c131 into main Jul 24, 2025
16 checks passed
@LunaWhispers LunaWhispers deleted the feature/list branch July 24, 2025 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants