Skip to content

Conversation

fu220
Copy link
Contributor

@fu220 fu220 commented Aug 4, 2025

Description

This pull request removes the load_to_cache field and adds trait method definitions to dfdaemon_download.rs and dfdaemon_upload.rs.

Related Issue

Changes

  • Removed cache-related processing from Task handling.
  • Added trait method definitions such as download_cache_task to dfdaemon_download.rs and dfdaemon_upload.rs to comply with the API format of version 2.1.55.

Motivation and Context

  • Aim to allow Task to focus on disk interactions while delegating memory cache operations to CacheTask.

Screenshots (if appropriate)

Copy link
Member

@gaius-qi gaius-qi left a comment

Choose a reason for hiding this comment

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

LGTM

@gaius-qi gaius-qi added the enhancement New feature or request label Aug 6, 2025
Copy link
Member

@gaius-qi gaius-qi left a comment

Choose a reason for hiding this comment

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

Please fix lint.

Copy link

codecov bot commented Aug 6, 2025

Codecov Report

❌ Patch coverage is 4.00000% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.44%. Comparing base (7796ee7) to head (1941328).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
dragonfly-client/src/grpc/dfdaemon_upload.rs 0.00% 15 Missing ⚠️
dragonfly-client/src/grpc/dfdaemon_download.rs 0.00% 9 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1264      +/-   ##
==========================================
- Coverage   48.51%   48.44%   -0.08%     
==========================================
  Files          60       60              
  Lines       14998    15008      +10     
==========================================
- Hits         7277     7270       -7     
- Misses       7721     7738      +17     
Files with missing lines Coverage Δ
dragonfly-client-storage/src/lib.rs 21.12% <ø> (+1.64%) ⬆️
dragonfly-client/src/bin/dfget/main.rs 48.03% <ø> (+0.04%) ⬆️
dragonfly-client/src/proxy/mod.rs 0.00% <ø> (ø)
dragonfly-client/src/resource/piece.rs 63.69% <ø> (ø)
dragonfly-client/src/resource/task.rs 8.48% <100.00%> (+0.10%) ⬆️
dragonfly-client/src/grpc/dfdaemon_download.rs 0.00% <0.00%> (ø)
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.

This pull request removes the load_to_cache field and adds trait method definitions to dfdaemon_download.rs and dfdaemon_upload.rs.

- Removed cache-related processing from Task handling.
- Added trait method definitions such as download_cache_task to dfdaemon_download.rs and dfdaemon_upload.rs to comply with the API format of version 2.1.55.

- Aim to allow Task to focus on disk interactions while delegating memory cache operations to CacheTask.

Signed-off-by: fu220 <2863318196@qq.com>
@fu220 fu220 force-pushed the remove-load-to-cache branch from c61239e to 1941328 Compare August 6, 2025 03:50
Copy link
Member

@gaius-qi gaius-qi left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@chlins chlins left a comment

Choose a reason for hiding this comment

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

lgtm

@chlins chlins merged commit 848737e into dragonflyoss:main Aug 6, 2025
7 checks passed
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