diff --git a/src/handlers.rs b/src/handlers.rs index 951a8a8..420509c 100644 --- a/src/handlers.rs +++ b/src/handlers.rs @@ -241,8 +241,9 @@ pub fn read_failed_slot(r: *mut ngx_http_request_t) -> Option { /// 顺位 → 源下标的映射**必须**走 `$cache_pick`(R-T5-5):它是**请求内缓存** /// 的(Task 4 的 memo)⇒ 与本次请求**实际用的源**严格一致; /// 另查一次上游表拿到的是**此刻**的池子 ⇒ 管理员在请求中途改了池子就错位。 -/// 另查的那一次**只**用来取「源个数」做**边界检查** -/// (防止下标越界)——这条检查必须保留。 +/// ⇒ 边界检查用的「源个数」也**从同一个请求级 memo 取** +/// (`cache::memo_source_count`,D3),不另查表、也不 clone 整份源列表: +/// 顺位下标与源个数因此处在**同一个下标空间**里,天然不会错位。 /// /// ⚠️ 调用点必须在 log handler 的 `status.is_empty()` **早退之后** /// (R-T5-1):没过缓存层的请求(401 无效 Key / 429 超配额 / 503 未配上游)