finds.dev

huangzworks/redis-3.0-annotated

带有详细注释的 Redis 3.0 代码(annotated Redis 3.0 source code)。

View on GitHub

★ 10,125CBSD-3-Clauseupdated Aug 2023

// the take

A line-by-line annotated copy of Redis 3.0's C source, written in Chinese by the author of 《Redis 设计与实现》 as study material while writing that book. It's for developers who want to understand Redis internals (dict, sds, ziplist, AOF/RDB, cluster, replication) by reading real production code with explanations attached, not for running a Redis instance.

The annotations are inline comments added directly to the original antirez/redis 3.0 tree with no other changes, so you can diff it against vanilla Redis to see exactly what was added and trust the code itself is unmodified. It covers the parts of Redis that are hardest to learn from docs alone - the low-level data structures (ziplist, intset, sds, dict) and subsystems like AOF rewriting, RDB serialization, and cluster gossip - with comments that explain the why, not just restate the code. The accompanying README table mapping every source file to a one-line description of its purpose is a genuinely useful index for navigating the codebase cold.

It's Redis 3.0 from 2015 - a decade out of date, missing streams, ACLs, modules, RESP3, and every cluster/replication improvement since, so it teaches a shape of Redis that no longer matches what you'd deploy or debug today. All comments are in Chinese with no translated version, which caps the audience for anyone who doesn't read Chinese. It's a frozen snapshot made for one book project, not an actively maintained reference - there's no indication annotations get revisited as understanding of edge cases evolves, and you obviously can't run this as a real Redis server (no patched CVEs, no backports) so its only value is reading, not deploying.

We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
10,125
Forks
4,171
Language
C
License
BSD-3-Clause
Last commit
26 Aug 2023

// nearby

If redis-3.0-annotated isn't quite it.

All repos →