Commit Graph

1195 Commits

Author SHA1 Message Date
Gaius f2315f2804
feat(dragonfly-client-storage): add write_piece_timeout to storage config and enhance piece download timeout handling (#1146)
feat(dragonfly-client-storage): add write_piece_timeout to storage config and enhance piece download timeout handling

This change introduces a `write_piece_timeout` configuration to the storage module, allowing customizable timeouts for writing pieces to storage (e.g., disk or cache). The default timeout is set to 90 seconds. The total timeout for piece operations now combines `download.piece was timeout` and `storage.write_piece_timeout`. Key changes include:

- Added `write_piece_timeout` field to `Storage` config with default and serialization support.
- Updated `wait_for_piece_finished` and `wait_for_piece_finished_by_task_id` to use combined timeout (`download.piece_timeout + storage.write_piece_timeout`).
- Introduced `DownloadPieceFinished` error for piece download timeouts and refactored `download_piece_from_source_finished` and `download_piece_from_parent_finished` to enforce timeouts using `tokio::select!`.
- Increased default `download.piece_timeout` from 60s to 120s for robustness.
- Removed `wait_for_piece_count` debug logging to simplify code.
- Updated tests to validate `write_piece_timeout` parsing.

These changes improve timeout granularity and reliability for piece operations.

Signed-off-by: Gaius <gaius.qi@gmail.com>
2025-05-12 20:52:21 +08:00
Gaius 8c6f9771c9
fix: scheduling and piece collection logic for task abortion (#1139)
Modify scheduling logic in persistent_cache_task.rs and task.rs to use strict inequality (>) for max_schedule_count comparison,
ensuring tasks abort only after exceeding the configured limit. Correct piece collection logic in piece_collector.rs to abort
tasks when collected_pieces is empty, fixing the condition for both PieceCollector and PersistentCachePieceCollector to align with intended behavior.

Signed-off-by: Gaius <gaius.qi@gmail.com>
2025-05-09 19:23:42 +08:00
Gaius 23efe2cb04
feat(dragonfly-client-config): change the default value oft the schedule_timeout (#1138)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2025-05-08 22:49:50 +08:00
dependabot[bot] 7e46bff143
chore(deps): Bump prost-wkt-types from 0.6.0 to 0.6.1 (#1135)
Bumps [prost-wkt-types](https://github.com/fdeantoni/prost-wkt) from 0.6.0 to 0.6.1.
- [Release notes](https://github.com/fdeantoni/prost-wkt/releases)
- [Changelog](https://github.com/fdeantoni/prost-wkt/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fdeantoni/prost-wkt/compare/v0.6.0...v0.6.1)

---
updated-dependencies:
- dependency-name: prost-wkt-types
  dependency-version: 0.6.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-07 10:30:20 +08:00
dependabot[bot] b2c1f26ce9
chore(deps): Bump local-ip-address from 0.6.3 to 0.6.5 (#1134)
Bumps [local-ip-address](https://github.com/LeoBorai/local-ip-address) from 0.6.3 to 0.6.5.
- [Release notes](https://github.com/LeoBorai/local-ip-address/releases)
- [Changelog](https://github.com/LeoBorai/local-ip-address/blob/main/CHANGELOG.md)
- [Commits](https://github.com/LeoBorai/local-ip-address/commits/v0.6.5)

---
updated-dependencies:
- dependency-name: local-ip-address
  dependency-version: 0.6.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-07 10:29:29 +08:00
dependabot[bot] 17e403c3dc
chore(deps): Bump toml from 0.8.21 to 0.8.22 (#1133)
Bumps [toml](https://github.com/toml-rs/toml) from 0.8.21 to 0.8.22.
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.21...toml-v0.8.22)

---
updated-dependencies:
- dependency-name: toml
  dependency-version: 0.8.22
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-07 10:28:37 +08:00
dependabot[bot] e96000b379
chore(deps): Bump github/codeql-action from 3.28.16 to 3.28.17 (#1137)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.16 to 3.28.17.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](28deaeda66...60168efe1c)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.28.17
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-06 10:47:28 +08:00
Gaius 233fcdf3a1
chore(.github/workflows): change rules of the stale actions (#1131)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2025-04-30 12:34:15 +08:00
yxxhero 5d3b05372b
comments(container_runtime): remove unused containerd config override (#1130)
Signed-off-by: yxxhero <aiopsclub@163.com>
2025-04-30 12:03:08 +08:00
Gaius f3fd5f46c4
feat(dragonfly-client-backend): change retry times for backend (#1129)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2025-04-29 16:39:28 +08:00
Gaius a15d556f95
feat(dragonfly-client): change MAX_PIECE_LENGTH to 64MiB (#1128)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2025-04-29 04:02:16 +00:00
Gaius a2ba39026e
feat: support fallocate for creating task (#1119)
* feat: support fallocate and filling zero for creating task

* feat: support fallocate and filling zero for creating task

---------

Signed-off-by: Gaius <gaius.qi@gmail.com>
2025-04-29 11:43:42 +08:00
dependabot[bot] f60bad399b
chore(deps): Bump toml_edit from 0.22.24 to 0.22.25 (#1127)
Bumps [toml_edit](https://github.com/toml-rs/toml) from 0.22.24 to 0.22.25.
- [Commits](https://github.com/toml-rs/toml/compare/v0.22.24...v0.22.25)

---
updated-dependencies:
- dependency-name: toml_edit
  dependency-version: 0.22.25
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-29 11:42:08 +08:00
dependabot[bot] 1600f0d591
chore(deps): Bump tokio-util from 0.7.14 to 0.7.15 (#1125)
Bumps [tokio-util](https://github.com/tokio-rs/tokio) from 0.7.14 to 0.7.15.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-util-0.7.14...tokio-util-0.7.15)

---
updated-dependencies:
- dependency-name: tokio-util
  dependency-version: 0.7.15
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-29 11:37:34 +08:00
dependabot[bot] ff0cce2fc8
chore(deps): Bump tabled from 0.18.0 to 0.19.0 (#1123)
Bumps [tabled](https://github.com/zhiburt/tabled) from 0.18.0 to 0.19.0.
- [Changelog](https://github.com/zhiburt/tabled/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zhiburt/tabled/commits)

---
updated-dependencies:
- dependency-name: tabled
  dependency-version: 0.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-29 11:37:15 +08:00
dependabot[bot] 87da08ab39
chore(deps): Bump actions/stale from 9.0.0 to 9.1.0 (#1122)
Bumps [actions/stale](https://github.com/actions/stale) from 9.0.0 to 9.1.0.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](28ca103628...5bef64f19d)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-version: 9.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-29 11:36:47 +08:00
dependabot[bot] 494b8cd95a
chore(deps): Bump github/codeql-action from 3.28.15 to 3.28.16 (#1121)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.15 to 3.28.16.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](45775bd823...28deaeda66)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.28.16
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-29 11:36:27 +08:00
dependabot[bot] 620c8fa6a8
chore(deps): Bump kentaro-m/auto-assign-action from 248761c4feb3917c1b0444e33fad1a50093b9847 to 7ae38e468e64dec0af17820972bc4915aa511ec2 (#1120)
chore(deps): Bump kentaro-m/auto-assign-action

Bumps [kentaro-m/auto-assign-action](https://github.com/kentaro-m/auto-assign-action) from 248761c4feb3917c1b0444e33fad1a50093b9847 to 7ae38e468e64dec0af17820972bc4915aa511ec2.
- [Release notes](https://github.com/kentaro-m/auto-assign-action/releases)
- [Commits](248761c4fe...7ae38e468e)

---
updated-dependencies:
- dependency-name: kentaro-m/auto-assign-action
  dependency-version: 7ae38e468e64dec0af17820972bc4915aa511ec2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-29 11:36:04 +08:00
dependabot[bot] 1c059171db
chore(deps): Bump toml from 0.8.20 to 0.8.21 (#1124)
Bumps [toml](https://github.com/toml-rs/toml) from 0.8.20 to 0.8.21.
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.20...toml-v0.8.21)

---
updated-dependencies:
- dependency-name: toml
  dependency-version: 0.8.21
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-29 11:34:34 +08:00
yxxhero cfa7dba465
refactor(ci/Dockerfile.dfinit, dragonfly-client/src/dynconfig/mod.rs): format and optimize code (#1117)
Signed-off-by: yxxhero <aiopsclub@163.com>
2025-04-27 10:13:17 +08:00
Gaius 9f6cecacd4
chore(.github/workflows): add stale action (#1113)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2025-04-25 18:41:10 +08:00
Gaius 8aec90c152
chore(.github/workflows): add auto assign action (#1114)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2025-04-25 18:41:02 +08:00
Gaius 900ab7abcc
chore(.github/workflows): add pr labels action (#1115)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2025-04-25 18:40:44 +08:00
Gaius 7950aa5ab3
feat: handle Interrupted error for io (#1112)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2025-04-25 10:48:30 +08:00
Gaius c21159037a
feat(dragonfly-client): add support for content-based task ID generation in Dragonfly client (#1111)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2025-04-24 20:54:46 +08:00
Gaius e2c7d9000a
feat(dragonfly-client): remove dfstore command (#1109)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2025-04-24 10:33:49 +08:00
Gaius 63ceb47d82
feat(dragonfly-client-storage): Change error log to info for cache task deletion failure (#1108)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2025-04-22 13:29:10 +00:00
KennyMcCormick 75c0c1f5a0
chroe: fix typo in ut (#1106)
Signed-off-by: cormick <cormick1080@gmail.com>
2025-04-22 04:34:21 +00:00
dependabot[bot] 37b93913cc
chore(deps): Bump clap from 4.5.35 to 4.5.37 (#1104)
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.35 to 4.5.37.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.35...clap_complete-v4.5.37)

---
updated-dependencies:
- dependency-name: clap
  dependency-version: 4.5.37
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-22 04:28:21 +00:00
dependabot[bot] 7b1a1f197e
chore(deps): Bump taiki-e/cache-cargo-install-action from 2.1.0 to 2.1.1 (#1103)
Bumps [taiki-e/cache-cargo-install-action](https://github.com/taiki-e/cache-cargo-install-action) from 2.1.0 to 2.1.1.
- [Release notes](https://github.com/taiki-e/cache-cargo-install-action/releases)
- [Changelog](https://github.com/taiki-e/cache-cargo-install-action/blob/main/CHANGELOG.md)
- [Commits](44857e0ff6...4d586f211d)

---
updated-dependencies:
- dependency-name: taiki-e/cache-cargo-install-action
  dependency-version: 2.1.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-22 12:25:03 +08:00
KennyMcCormick 657d8867bf
test: add ut for resource.task (#1101)
Signed-off-by: cormick <cormick1080@gmail.com>
2025-04-18 10:25:16 +00:00
Gaius 2a0ef8ec19
fix: solve the memory leak caused by rayon (#1102)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2025-04-18 09:49:05 +00:00
KennyMcCormick f3b1b67607
test: add ut for shutdown (#1100)
Signed-off-by: cormick <cormick1080@gmail.com>
2025-04-18 09:55:00 +08:00
KennyMcCormick 938d17c0cf
chore: opt code under persistent_cache_task (#1098)
chroe: opt code under persistent_cache_task

Signed-off-by: cormick <cormick1080@gmail.com>
2025-04-16 13:02:47 +00:00
KennyMcCormick ad335784fe
fix: modify ut logic which is incorrect under macOS (#1099)
Signed-off-by: cormick <cormick1080@gmail.com>
2025-04-16 20:53:27 +08:00
Gaius cfab09f4c0 chore: pin cargo-deb dependency version 2025-04-15 05:11:19 -04:00
Gaius 3b3fbf7abb
fix: cargo deb building
Signed-off-by: Gaius <gaius.qi@gmail.com>
2025-04-15 15:24:38 +08:00
Gaius 5d2b719626
chore(dragonfly-client): fix building for deb package
Signed-off-by: Gaius <gaius.qi@gmail.com>
2025-04-15 15:03:06 +08:00
dependabot[bot] 57078c5d03
chore(deps): Bump reqwest-middleware from 0.4.1 to 0.4.2 (#1092)
Bumps [reqwest-middleware](https://github.com/TrueLayer/reqwest-middleware) from 0.4.1 to 0.4.2.
- [Release notes](https://github.com/TrueLayer/reqwest-middleware/releases)
- [Commits](https://github.com/TrueLayer/reqwest-middleware/commits/reqwest-middleware-v0.4.2)

---
updated-dependencies:
- dependency-name: reqwest-middleware
  dependency-version: 0.4.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-14 21:05:15 +08:00
dependabot[bot] ba7940dc6f
chore(deps): Bump tokio-util from 0.7.13 to 0.7.14 (#1096)
Bumps [tokio-util](https://github.com/tokio-rs/tokio) from 0.7.13 to 0.7.14.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-util-0.7.13...tokio-util-0.7.14)

---
updated-dependencies:
- dependency-name: tokio-util
  dependency-version: 0.7.14
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-14 21:04:51 +08:00
dependabot[bot] c7bbc522c0
chore(deps): Bump reqwest-tracing from 0.5.6 to 0.5.7 (#1095)
Bumps [reqwest-tracing](https://github.com/TrueLayer/reqwest-middleware) from 0.5.6 to 0.5.7.
- [Release notes](https://github.com/TrueLayer/reqwest-middleware/releases)
- [Commits](https://github.com/TrueLayer/reqwest-middleware/commits/reqwest-tracing-v0.5.7)

---
updated-dependencies:
- dependency-name: reqwest-tracing
  dependency-version: 0.5.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-14 21:04:30 +08:00
dependabot[bot] 7cf5a17a90
chore(deps): Bump github/codeql-action from 3.28.14 to 3.28.15 (#1097)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.14 to 3.28.15.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](fc7e4a0fa0...45775bd823)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.28.15
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-14 21:04:12 +08:00
dependabot[bot] aa96b9801b
chore(deps): Bump anyhow from 1.0.97 to 1.0.98 (#1093)
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.97 to 1.0.98.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.97...1.0.98)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-version: 1.0.98
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-14 20:59:01 +08:00
Gaius 3299a2aa20
refactor: add network interface utilities and enhance upload rate limiting (#1091)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2025-04-14 16:57:45 +08:00
baowj a0c3494d7a
feat: add DfdaemonUpload.sync_host. (#929)
Signed-off-by: baowj <bwj_678@qq.com>
2025-04-14 13:27:18 +08:00
Zhaoxinxin 4f6417c221
Feat client config add test (#1086)
* feat: client config add test

Signed-off-by: zhaoxinxin <1186037180@qq.com>

* feat: client config add test

Signed-off-by: zhaoxinxin <1186037180@qq.com>

* feat: client config add test

Signed-off-by: zhaoxinxin <1186037180@qq.com>

* feat: client config add test

Signed-off-by: zhaoxinxin <1186037180@qq.com>

* feat: client config add test

Signed-off-by: zhaoxinxin <1186037180@qq.com>

* feat: client config add test

Signed-off-by: zhaoxinxin <1186037180@qq.com>

---------

Signed-off-by: zhaoxinxin <1186037180@qq.com>
2025-04-12 15:55:50 +08:00
Gaius 3abe3654ef
chore: update verison to 0.2.23 (#1090)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2025-04-11 17:22:41 +08:00
Gaius 8631030c97
test(dragonfly-client-storage/benches): remove 1u64 when create cache (#1089)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2025-04-11 16:27:04 +08:00
dependabot[bot] fc47cb3855
chore(deps): Bump crossbeam-channel from 0.5.11 to 0.5.15 (#1088)
Bumps [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam) from 0.5.11 to 0.5.15.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-channel-0.5.11...crossbeam-channel-0.5.15)

---
updated-dependencies:
- dependency-name: crossbeam-channel
  dependency-version: 0.5.15
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-11 14:51:28 +08:00
Gaius f1a9f0af55
feat: remove unnecessary dependencies (#1085)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2025-04-10 17:03:04 +08:00