redis/redis at 3acc0c4 · static read-only analysis · why-not-rust method 2.0redis/redis @ 3acc0c4 · 静态只读分析 · why-not-rust 方法 2.0
Repository: github.com/redis/redis at commit 3acc0c4, shallow clone, 1,858 tracked files. Scope: the whole repository, with the RESP parsing path as the candidate seam. Sampling: src/ is 209,442 lines of C and headers across 218 files. deps/ is 141,130 lines of C and headers across 508 files in eight vendored projects; of those, the jemalloc src/include and lua/src trees that actually compile are 73,227. Every own-versus-vendored comparison in this report uses that matched .c/.h basis, never whole-tree totals. src/ae.c is 516 lines; src/networking.c is 6,027. src/redismodule.h is 1,951 lines and carries 402 REDISMODULE_API occurrences, of which 399 are function-pointer entry points (the other three are the APIVER define and the include guard), corroborated independently by 399 REDISMODULE_GET_API occurrences. There are 459 command definition files, and tests/ is 113,836 lines. No build, test, benchmark or network call was run against the project. Objective: no specific RFC was supplied, so the assessment takes the commonly stated proposal — reduce memory-unsafety exposure and improve throughput by rewriting Redis in Rust. User-supplied facts: none. No Amdahl calculation appears. D1 is UNKNOWN because no public end-to-end profile exists, and without a time share there is no defensible f. The performance half of the proposal is therefore recorded UNKNOWN rather than refuted. The decision turns on G3 and G4, which fail on measured facts about the vendored C and the module ABI. This is a structured decision protocol, not a statistical predictor.仓库:github.com/redis/redis,commit 3acc0c4,shallow clone,1,858 个纳管文件。范围:整个仓库,候选接缝是 RESP 解析路径。采样:src/ 是 209,442 行 C 和头文件,分布在 218 个文件里。deps/ 是 141,130 行 C 和头文件,分布在八个第三方项目的 508 个文件里;其中真正参与编译的 jemalloc src/include 与 lua/src 两棵树合计 73,227 行。本报告里所有「自有 vs 第三方」的对比都用这个对齐的 .c/.h 口径,不用整棵树的总数。src/ae.c 516 行;src/networking.c 6,027 行。src/redismodule.h 1,951 行,其中 REDISMODULE_API 出现 402 次,399 次是函数指针入口点(另外三次是 APIVER 宏和 include guard),并由 399 次 REDISMODULE_GET_API 出现独立佐证。命令定义文件 459 个,tests/ 113,836 行。没有对项目做过任何构建、测试、基准或网络调用。目标:没有人给出具体的 RFC,因此按通常被提出的那个提案评估——用 Rust 重写 Redis,以降低内存不安全暴露并提升吞吐。用户提供的事实:无。本报告没有 Amdahl 计算。D1 是 UNKNOWN,因为不存在公开的端到端 profile;没有时间占比就没有站得住的 f。所以提案里性能那一半记为 UNKNOWN,不是被否证。决策落在 G3 和 G4 上,这两道门是在关于第三方 C 和模块 ABI 的实测事实上失败的。这是一套结构化决策流程,不是统计预测器。
| What we don't know证据缺口 | What it would change会改变什么 |
| End-to-end Redis profile at a stated QPS and payload mix端到端 Redis profile,含明确的 QPS 和负载配比 | This settles the performance half. While it is missing, D1 and D2 stay UNKNOWN and no throughput claim can be authorized in any language.它能了结性能那一半。缺着的时候,D1 和 D2 停在 UNKNOWN,任何语言的吞吐主张都授权不了。 |
| Root-cause classification of Redis's advisory history对 Redis 历史安全公告做根因分类 | Would tell the hardening work where to aim, and would strengthen or weaken the protocol-parser extraction option.它能告诉加固工作往哪里打,也会让协议解析器抽取方案的理由变强或变弱。 |
| A written plan for the module ABI and Lua semantics一份关于模块 ABI 和 Lua 语义的书面计划 | Without it, G4 stays FAIL for every reimplementation option regardless of what the profile shows.没有它,不管 profile 显示什么,G4 对每个重新实现的方案都停在 FAIL。 |