Skip to content

Conversation

fu220
Copy link
Contributor

@fu220 fu220 commented Sep 3, 2025

Description

This pull request adds the CacheTask task type, completes the adaptation for CacheTask during gRPC download and piece processing, and finally adds the cache parameter to dfget for creating and managing CacheTask.

Related Issue

Changes

  • Added --cache parameter to dfget to create and manage CacheTask.
  • Added cache task and implemented its download logic. Implemented piece download execution for cache tasks in piece.rs and piece_download.rs.
  • Added handling for cache peer and cache task in dragonfly-client/grpc/scheduler.rs.
  • Added cache task support to dfdaemon gRPC servers.

Motivation and Context

To introduce the CacheTask task type to avoid disk interactions, thereby increasing response speed.

Screenshots (if appropriate)

Copy link

codecov bot commented Sep 3, 2025

Codecov Report

❌ Patch coverage is 2.65687% with 1722 lines in your changes missing coverage. Please review.
✅ Project coverage is 42.63%. Comparing base (fdd3fa7) to head (1d22e35).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
dragonfly-client/src/grpc/dfdaemon_upload.rs 0.00% 601 Missing ⚠️
dragonfly-client/src/resource/cache_task.rs 8.48% 442 Missing ⚠️
dragonfly-client/src/grpc/dfdaemon_download.rs 0.00% 373 Missing ⚠️
dragonfly-client/src/bin/dfget/main.rs 0.69% 142 Missing ⚠️
dragonfly-client/src/resource/piece_downloader.rs 0.00% 45 Missing ⚠️
dragonfly-client/src/resource/piece.rs 0.00% 44 Missing ⚠️
dragonfly-client-util/src/id_generator/mod.rs 10.63% 42 Missing ⚠️
dragonfly-client/src/grpc/mod.rs 0.00% 21 Missing ⚠️
dragonfly-client/src/bin/dfdaemon/main.rs 0.00% 12 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1330      +/-   ##
==========================================
- Coverage   46.94%   42.63%   -4.31%     
==========================================
  Files          60       61       +1     
  Lines       15066    16680    +1614     
==========================================
+ Hits         7072     7112      +40     
- Misses       7994     9568    +1574     
Files with missing lines Coverage Δ
dragonfly-client/src/grpc/scheduler.rs 0.00% <ø> (ø)
dragonfly-client/src/bin/dfdaemon/main.rs 0.00% <0.00%> (ø)
dragonfly-client/src/grpc/mod.rs 0.00% <0.00%> (ø)
dragonfly-client-util/src/id_generator/mod.rs 86.13% <10.63%> (-12.16%) ⬇️
dragonfly-client/src/resource/piece.rs 56.77% <0.00%> (-7.35%) ⬇️
dragonfly-client/src/resource/piece_downloader.rs 8.82% <0.00%> (-2.06%) ⬇️
dragonfly-client/src/bin/dfget/main.rs 26.31% <0.69%> (-1.54%) ⬇️
dragonfly-client/src/grpc/dfdaemon_download.rs 0.00% <0.00%> (ø)
dragonfly-client/src/resource/cache_task.rs 8.48% <8.48%> (ø)
dragonfly-client/src/grpc/dfdaemon_upload.rs 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

## Description
This pull request adds the CacheTask task type, completes the adaptation for CacheTask during gRPC download and piece processing, and finally adds a cache parameter to dfget for creating and managing CacheTask.

## Related Issue

### Changes
- Added --cache parameter to dfget to create and manage CacheTask.
- Added cache task and implemented its download logic.
Implemented piece download execution for cache tasks in piece.rs and piece_download.rs.
- Added handling for cache peer and cache task in dragonfly-client/grpc/scheduler.rs.
- Added cache task support to dfdaemon gRPC servers.

## Motivation and Context
To introduce the CacheTask task type to avoid disk interactions, thereby increasing response speed.

Signed-off-by: fu220 <[email protected]>
@gaius-qi gaius-qi added the enhancement New feature or request label Sep 16, 2025
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.

2 participants