fix(sync): 移除多线程下载并补齐staging复用回归

This commit is contained in:
2026-07-24 10:34:58 +08:00
parent 3f5d2a8da7
commit a729615a48
11 changed files with 173 additions and 257 deletions
+2 -2
View File
@@ -445,8 +445,8 @@ fn retry_backoff(busy: bool, attempt: usize) -> std::time::Duration {
/// 退避时长(毫秒)的纯计算,便于独立于 cfg 门控的基值做单测。
///
/// - `ETXTBSY`fork/exec 竞态):极短固定退避,只为让兄弟进程完成 execve。
/// - 其余网络类可重试失败:指数退避(`base·2^(attempt-1)`,上限 5s),并发下载
/// 时对官方 CDN 更礼貌,避免 N 个连接失败后同时立即重发。
/// - 其余网络类可重试失败:指数退避(`base·2^(attempt-1)`,上限 5s),避免
/// 连续失败后立即重发。
fn backoff_delay_ms(base: u64, busy: bool, attempt: usize) -> u64 {
if busy {
return 5 * attempt as u64;