Skip to content

docs: 修正 Redis 混合持久化默认开启的版本说明 - #2953

Open
JayPokale wants to merge 1 commit into
Snailclimb:mainfrom
JayPokale:docs-redis-aof-preamble-default
Open

JayPokale wants to merge 1 commit into
Snailclimb:mainfrom
JayPokale:docs-redis-aof-preamble-default

Conversation

@JayPokale

Copy link
Copy Markdown

问题

docs/database/redis/redis-persistence.md 中写的是“混合持久化:Redis 4.0-6.x 需手动开启,Redis 7.0+ 默认启用”(共 3 处),与 Redis 源码不符。

aof-use-rdb-preamble 在 Redis 4.0 默认是 no,从 5.0 起默认就是 yes,7.0 并没有改过默认值。本仓库 docs/distributed-system/distributed-id.md 里已经是正确说法(“Redis 4.0 示例配置默认关闭,Redis 5.0+ 示例配置默认开启”),两篇文章互相矛盾。

依据

  • redis/redis 提交 28d28ef(2018-03-25,“AOF: enable RDB-preamble rewriting by default”,提交说明写明 “so we are enabling it for the new 5.0 release”):redis.conf 中 aof-use-rdb-preamble no 改为 yes,src/server.h 中 CONFIG_DEFAULT_AOF_USE_RDB_PREAMBLE 由 0 改为 1。
  • 各版本 redis.conf:4.0.14 是 no;5.0.0、6.0.0、7.0.0 都是 yes。
  • 源码默认值:4.0.14 src/server.h 第 142 行为 0,5.0.0 src/server.h 第 145 行为 1,6.0.0 src/config.c 第 2111 行、7.0.0 src/config.c 第 2924 行的默认值均为 1。

改动

只改同一说法出现的 3 处(开头的版本差异列表、配置示例注释、“版本差异”小节),把“4.0-6.x 默认关闭 / 7.0+ 默认启用”改为“4.0 默认关闭 / 5.0+ 默认启用”,共 4 行。


说明:本 PR 在 AI 助手(Claude)协助下完成;上述依据已对照 Redis 源码和各版本 redis.conf 核对过。

redis-persistence.md 写的是“Redis 4.0-6.x 需手动开启,Redis 7.0+ 默认启用”,
与 Redis 源码不符:aof-use-rdb-preamble 在 4.0 默认为 no,从 5.0 起默认为 yes。

- redis/redis 提交 28d28ef3cf0f(2018-03-25,AOF: enable RDB-preamble rewriting
  by default)把 redis.conf 中的默认值由 no 改为 yes,并把 src/server.h 中的
  CONFIG_DEFAULT_AOF_USE_RDB_PREAMBLE 由 0 改为 1,随 5.0 发布
- redis.conf:4.0.0 和 4.0.14 为 aof-use-rdb-preamble no,
  5.0.0、6.0.0、7.0.0 均为 yes
- 本仓库 distributed-id.md 已有正确说法:4.0 默认关闭,5.0+ 默认开启

同步修正该文件中三处相同的表述。

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant