Skip to content

Commit bff2301

Browse files
authored
feat: add 'load_to_cache' field to Download message (#437)
Signed-off-by: southwest <[email protected]>
1 parent 1834d53 commit bff2301

File tree

8 files changed

+141
-112
lines changed

8 files changed

+141
-112
lines changed

Diff for: Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "dragonfly-api"
3-
version = "2.1.3"
3+
version = "2.1.4"
44
authors = ["Gaius <[email protected]>"]
55
edition = "2021"
66
license = "Apache-2.0"

Diff for: pkg/apis/common/v2/common.pb.go

+124-110
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: pkg/apis/common/v2/common.pb.validate.go

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: pkg/apis/common/v2/common.proto

+4
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,10 @@ message Download {
441441
bool is_prefetch = 19;
442442
// need_piece_content is the flag to indicate whether the response needs to return piece content.
443443
bool need_piece_content = 20;
444+
// load_to_cache indicates whether the content downloaded will be stored in the cache storage.
445+
// Cache storage is designed to store downloaded piece content from preheat tasks,
446+
// allowing other peers to access the content from memory instead of disk.
447+
bool load_to_cache = 21;
444448
}
445449

446450
// Object Storage related information.

Diff for: proto/common.proto

+4
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,10 @@ message Download {
437437
bool is_prefetch = 19;
438438
// need_piece_content is the flag to indicate whether the response needs to return piece content.
439439
bool need_piece_content = 20;
440+
// load_to_cache indicates whether the content downloaded will be stored in the cache storage.
441+
// Cache storage is designed to store downloaded piece content from preheat tasks,
442+
// allowing other peers to access the content from memory instead of disk.
443+
bool load_to_cache = 21;
440444
}
441445

442446
// Object Storage related information.

Diff for: src/common.v2.rs

+5
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,11 @@ pub struct Download {
494494
/// need_piece_content is the flag to indicate whether the response needs to return piece content.
495495
#[prost(bool, tag = "20")]
496496
pub need_piece_content: bool,
497+
/// load_to_cache indicates whether the content downloaded will be stored in the cache storage.
498+
/// Cache storage is designed to store downloaded piece content from preheat tasks,
499+
/// allowing other peers to access the content from memory instead of disk.
500+
#[prost(bool, tag = "21")]
501+
pub load_to_cache: bool,
497502
}
498503
/// Object Storage related information.
499504
#[derive(serde::Serialize, serde::Deserialize)]

Diff for: src/descriptor.bin

352 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)