feat(resource): 增加 CAS 诊断与索引过滤优化
bat-rust / Build and test Rust (push) Canceled after 0s
bat-rust / Build and test Go API (push) Canceled after 0s

补充 doctor cas 只读诊断、校验 CAS 对象分片布局,并将常用 ResourceRepository metadata 查询下推到 SQLite。

Refs G-011
This commit is contained in:
2026-09-01 00:41:41 +08:00
parent 4ed81f0030
commit fdd4075e7e
12 changed files with 467 additions and 22 deletions
+3 -3
View File
@@ -192,10 +192,10 @@ impl ResourceQuery {
}
}
/// 是否包含需要读取完整 `Resource` 后才能判断的条件。
/// 是否包含通用仓储需要读取完整 `Resource` 后才能判断的条件。
///
/// 基础索引可先用类型、hash、路径模式和 destination 缩小范围;这些条件
/// 需要再按 metadata 过滤,确保 `list()` 与 `count()` 的语义一致。
/// 具体后端可以把这些 metadata 条件下推到自身索引;内存实现仍用完整
/// `Resource` 过滤来保持 `list()` 与 `count()` 的语义一致。
pub fn requires_resource_scan(&self) -> bool {
self.official_release_id.is_some()
|| self.platform.is_some()