Commit Graph

21 Commits

Author SHA1 Message Date
Gaius cd8b9986c1
feat(golang/proto): add PreheatImage and StatImage for scheduler
Signed-off-by: Gaius <gaius.qi@gmail.com>
2025-07-29 19:39:46 +08:00
this is my name 80c539463b
feat: add Cache Task mechanism (#512)
* # Description
This pull request introduces APIs for the new Cache Task mechanism, enabling support for memory cache operations. Additionally, by refactoring the Download model and removing the load_to_cache field, the Task component now focuses exclusively on disk I/O operations, while the Cache Task handles memory cache operations. Finally, the version number of the dragonfly-api package has been incremented.

## Key Changes

### common.proto
- Added a new enum type Cache to TaskType to identify CacheTask.
- Introduced a new structure CachePeer to represent peers handling cache tasks.
- Added a new structure CacheTask to define metadata for cache tasks.
- Removed the load_to_cache field from the Download structure, as Tasks will no longer handle cache operations.

### dfdaemon.proto
- Added three RPC calls (DownloadCacheTask, StatCacheTask, DeleteCacheTask) to the DfdaemonUpload and DfdaemonDownload services for cache task management.
- Added two RPC calls (SyncCachePieces, DownloadCachePiece) to the DfdaemonUpload service for cache piece synchronization.
- Introduced 9 new message types to support requests and responses for CacheTask downloads.

### scheduler.proto
- Added five RPC calls to the Scheduler service: AnnounceCachePeer, StatCachePeer, DeleteCachePeer for cache peer management. StatCacheTask, DeleteCacheTask for cache task management.
- Introduced 16 new message types to cover the full lifecycle state transitions of cache tasks.

## Version Update
- Incremented the version of the dragonfly-api package from 2.1.47 to 2.1.48 in Cargo.toml to reflect the new changes.

## Related Issue

## Motivation and Context
- Separation of Responsibilities: Tasks now focus exclusively on disk I/O operations, while CacheTask independently handles memory cache management.

Signed-off-by: fu220 <2863318196@qq.com>

* Changed Download and introduced CacheDownload.

- Added more detailed descriptions for the CACHE type in TaskType, while clarifying that the STANDARD type interacts exclusively with disk operations.
- Removed the load_to_cache field and related information from the Download structure.
- Introduced CacheDownload for handling CacheTask downloads.

Signed-off-by: fu220 <2863318196@qq.com>

* Removed CacheDownload and directly merged into the Request

Signed-off-by: fu220 <2863318196@qq.com>

* Allow large_enum_variant in RegisterCachePeerRequest

Signed-off-by: fu220 <2863318196@qq.com>

---------

Signed-off-by: fu220 <2863318196@qq.com>
2025-07-24 18:27:23 +08:00
Gaius a65d57a10b
feat: remove sync probes api (#401)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2024-09-30 17:13:44 +08:00
Gaius 28a7989601
feat: rename cache task to persistent cache task (#394)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2024-09-26 15:34:55 +08:00
Gaius ba358f22e9
feat: remove AnnouncePeers api in scheduler (#392)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2024-09-25 21:43:00 +08:00
Chongzhi Deng dbf4bbae2b
feat: add ListHosts proto (#389)
Signed-off-by: BruceAko <chongzhi@hust.edu.cn>
2024-09-23 22:45:41 +08:00
Chongzhi Deng 32065ec25b
feat: add AnnouncePeers proto and fix typo (#343)
feat: add AnnouncePeers proto

1. add AnnouncePeers api
2. fix typo of dfdaemon

Signed-off-by: BruceAko <chongzhi@hust.edu.cn>
2024-07-10 19:51:57 +08:00
Gaius 7998f59978
feat: change UploadCacheTask message (#338)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2024-07-08 12:36:22 +08:00
Gaius 1bbcef2694
feat: change UploadCacheTaskRequest type to stream (#335)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2024-07-05 18:17:12 +08:00
Gaius 5ccb896ce6
fix: build error in descriptor.bin (#331)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2024-06-28 18:51:52 +08:00
Chongzhi Deng 7431d58884
feat: add interval field to AnnounceHostRequest (#330)
Signed-off-by: BruceAko <chongzhi@hust.edu.cn>
2024-06-28 18:42:37 +08:00
Gaius 183280e924
fix: ttl validation format
Signed-off-by: Gaius <gaius.qi@gmail.com>
2024-06-18 14:45:53 +08:00
Gaius e1e59d1696
feat: add announce proto of the cache task in scheduler (#327)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2024-06-17 22:06:34 +08:00
Gaius 110fe0ebc7
feat: change leave to delete in scheduler messages (#325)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2024-06-17 15:30:39 +08:00
Gaius ab1743c359
feat: add leave task api (#313)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2024-05-16 21:32:38 +08:00
Gaius aae0807767
feat: update verison to v2 (#147)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2023-07-20 21:56:21 +08:00
Gaius 3a54813d13
feat: remove SyncNetworkTopology api (#119)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2023-04-24 18:56:19 +08:00
Gaius b12d940bf7
feat: add SyncNetworkTopology to scheduler (#62)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2023-01-16 22:23:56 +08:00
Gaius a0551da924
feat: remove NetTopology params (#61)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2023-01-16 17:35:01 +08:00
Gaius b0bebd2958
fix: grpc namespace conflict (#54)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2023-01-10 12:24:27 +08:00
Gaius 58fdcc6ff5
feat: add ImportTask, ExportTask and DeleteTask api (#50)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2022-12-21 14:10:08 +08:00