fetch_status 四值
downloader:fetch_result:{url_hash} → {fetch_status, fetched_at, object_id, fail_reason} · 唯一写入方 下载器
| fetch_status抓取结果状态 | 24h count24h 页数 | object_id对象标识 | statistics统计字段 | health_signal健康信号 | link_list链接数组 |
|---|---|---|---|---|---|
| done渲染成功 | 318,904 | 有 | 有 | 有 | 有 |
| empty渲染成功但正文为空 | 21,588 | 有 | 有 | 有 | 有 |
| not_modified304,未渲染 | 24,190 | null | 全 null | null | null |
| failed失败 | 7,458 | null | 全 null | null | null |
⚠️ not_modified 下所有统计字段为 null,调度器必须跳过统计更新。否则 304 会被算成 text_length 骤降并立刻触发复核 —— 变更检测省下的每次重抓,都换来一次更贵的误报复核(复核要重采 3~5 页)。
⚠️ not_modified 下 link_list 是缺失,不是空。null 与 [] 语义不同,注释必须区分。
⚠️ fetch_status 与调度器的 schedule_status、domain_health_status 是三套不同枚举,禁止互相赋值或复用常量。三个 _status 前缀各不相同不构成歧义,真正危险的是同名不同义。
逐条记录
近 24 小时抽样 · url_hash 为主键,32 字符小写 hex
| url_hashURL 哈希 · 主键 | url请求地址 | fetch_status抓取结果状态 | http_statusHTTP 状态 | fetched_at抓取时间 | object_id对象标识 | fail_reason失败原因 | actions操作 |
|---|---|---|---|---|---|---|---|
| 7f2a9c1d4e6b08a3… | https://news.example.tw/post/48213 | done | 200 | 2026-08-15T07:47:52Z | 3,01637037d6 | — | 对象 |
| b1d40e77c2a5931f… | https://docs.example.cn/guide/5 | done | 200 | 2026-08-15T07:47:49Z | 5,0a92f1cc44 | — | 对象 |
| 2c77af3b91e0d648… | https://shop.example.jp/item/9910 | empty | 200 | 2026-08-15T07:47:31Z | 7,02be55d139 | — | 对象 |
| 9e04b2d6f81c7a35… | https://blog.example.com/p/771 | not_modified | 304 | 2026-08-15T07:46:12Z | null | — | 无对象 |
| 45cae09b7d213f8e… | https://m.example.hk/article/22 | failed | 502 | 2026-08-15T07:45:58Z | null | 网关够不到源站 | 域名 |
| d8317f6a04be95c2… | https://heavy.example.jp/spa/3301 | failed | null | 2026-08-15T07:45:11Z | null | 渲染超时(Obscura) | 异常统计 |
⚠️ 最后一行 http_status 为 null:渲染超时时压根没拿到响应。这一类是我方问题,不是站点的,调度器绝不能计入域名熔断 —— 否则 Obscura 一抖,我们会自己停掉一批健康站,且完全查不出原因。
⚠️ 全系统 HTTP 状态只有一个名字:http_status。网页对象、report、探针响应、导出项一律相同,曾用的 status_code 已废弃。
fail_reason 的取值集尚未定义
CONVENTION.md 第二条 ·「为什么失败」类字段全系统只允许四个
| field字段 | level粒度 | owner所有者 | values defined in取值定义在 |
|---|---|---|---|
| fail_reason失败原因 | URL,单次 | 下载器 | 尚未定义 需三方确认后写入 DEV-downloader-v1.md |
| suspend_reason熔断原因 | 域名,可用性 | 调度器 | DEV-scheduler.md §9.6 |
| undetermined_reason判不出来的原因 | 域名,判定 | 采样器 | DEV-sampler.md §8.4 |
| verdict_reason判定结论说明 | 域名,结论 | 采样器 | 自由文本,不是枚举 |
⚠️ 上表第一行是本系统目前唯一没有取值表的「原因」字段。本页 fail_reason 列显示的中文是按 DEV-scheduler.md §9.3 与 §十一 的现象描述展示的,不是正式枚举取值。前端不得把这些中文写死当枚举 —— 枚举取值必须全小写 snake_case,禁止缩写,且不得与字段名重名。
⚠️ 定取值时要注意与 suspend_reason 不产生语义混淆:后者是「这个域名现在能不能连上」,前者是「这一次抓取为什么失败」。
本表不管什么
DEV-downloader-v1.md §八 · URL 队列与域名规则属于另外两个服务
| thing事项 | owner归属 | note说明 |
|---|---|---|
| 要不要重试 | 调度器 | DEV-scheduler.md §十一。下载器只 report,不自己排重试 |
| 下次什么时候抓 | 调度器 | next_fetch_at,URL 级 |
| 要不要熔断这个域名 | 调度器 | scheduler:domain_health_runtime,唯一写入方是调度器 |
| 这个域名是不是 CSR | 采样器 | verdict,四值枚举 |
| URL 入队与去重 | 调度器 | 布隆过滤器与 url_ready_index,本系统不拥有、不写入 |
⚠️ 下载器的定位是「拿到 URL 就渲染」:不判定域名、不决定抓什么、不做正文抽取。本表只回答「这一条抓成什么样了」。