feat(upload): add persistent task management features for upload grpc #1541
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request implements and wires up persistent task management features in the
DfdaemonUploadServerand 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:
persistent_taskfield to bothDfdaemonUploadServerandDfdaemonUploadServerHandler, 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:
stat_persistent_taskanddelete_persistent_taskmethods to allow clients to query and delete persistent tasks, including proper tracing, metrics collection, and error handling.sync_persistent_piecesas 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.download_persistent_pieceto 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)