Skip to content

Conversation

@gaius-qi
Copy link
Member

Description

This pull request implements and wires up persistent task management features in the DfdaemonUploadServer and its handler, enabling full support for stat-ing, deleting, syncing, and downloading persistent tasks and their pieces via gRPC. The changes include adding the necessary persistent task manager, updating constructors and struct members, and providing complete implementations for the relevant gRPC methods.

Persistent task manager integration:

  • Added persistent_task field to both DfdaemonUploadServer and DfdaemonUploadServerHandler, updated their constructors, and ensured the persistent task manager is passed and used throughout the server and handler logic. [1] [2] [3] [4] [5] [6]

Persistent task gRPC method implementations:

  • Implemented stat_persistent_task and delete_persistent_task methods to allow clients to query and delete persistent tasks, including proper tracing, metrics collection, and error handling.
  • Implemented sync_persistent_pieces as a streaming RPC, enabling clients to receive metadata for finished pieces of a persistent task as they become available, with robust error handling and streaming logic.
  • Implemented download_persistent_piece to allow clients to download the content of a specific persistent piece, including reading from local storage, metrics, and error handling.

Related Issue

Motivation and Context

Screenshots (if appropriate)

@gaius-qi gaius-qi added this to the v2.4.0 milestone Dec 16, 2025
@gaius-qi gaius-qi self-assigned this Dec 16, 2025
@gaius-qi gaius-qi added the enhancement New feature or request label Dec 16, 2025
@gaius-qi gaius-qi enabled auto-merge (squash) December 16, 2025 06:45
@codecov
Copy link

codecov bot commented Dec 16, 2025

Codecov Report

❌ Patch coverage is 0% with 313 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.29%. Comparing base (47e6e01) to head (11af72e).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
dragonfly-client/src/grpc/dfdaemon_upload.rs 0.00% 297 Missing ⚠️
dragonfly-client/src/bin/dfdaemon/main.rs 0.00% 16 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1541      +/-   ##
==========================================
- Coverage   47.04%   46.29%   -0.76%     
==========================================
  Files          71       71              
  Lines       18947    19255     +308     
==========================================
  Hits         8914     8914              
- Misses      10033    10341     +308     
Files with missing lines Coverage Δ
dragonfly-client/src/bin/dfdaemon/main.rs 0.00% <0.00%> (ø)
dragonfly-client/src/grpc/dfdaemon_upload.rs 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

@gaius-qi gaius-qi merged commit 0597cfa into main Dec 16, 2025
8 of 9 checks passed
@gaius-qi gaius-qi deleted the feature/persistent-task-grpc branch December 16, 2025 06:53
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.

4 participants