Skip to content

docs: correct appendfsync always description - main thread fsync, not background thread#2816

Merged
Snailclimb merged 3 commits intoSnailclimb:mainfrom
Senrian:fix-appendfsync-always
Apr 6, 2026
Merged

docs: correct appendfsync always description - main thread fsync, not background thread#2816
Snailclimb merged 3 commits intoSnailclimb:mainfrom
Senrian:fix-appendfsync-always

Conversation

@Senrian
Copy link
Copy Markdown
Contributor

@Senrian Senrian commented Apr 6, 2026

Summary

Fix incorrect documentation about appendfsync always in Redis docs. The original text incorrectly stated that always uses a background thread (aof_fsync) to call fsync, when in fact always runs fsync on the main thread (blocking it until the flush completes).

Changes

Root Cause

Redis 7.2 source code (aof.c try_fsync function) shows:

  • AOF_FSYNC_ALWAYSredis_fsync(server.aof_fd) called directly (main thread)
  • AOF_FSYNC_EVERYSECaof_background_fsync(server.aof_fd) called (background thread)

Files Changed

  1. docs/database/redis/redis-persistence.md: Fixed appendfsync always description to clarify main thread fsync
  2. docs/database/redis/redis-common-blocking-problems-summary.md: Same fix
  3. docs/database/redis/redis-questions-02.md: Same fix in config comments

Testing

  • git diff --check

Closes #2697, Closes #2812

@Snailclimb Snailclimb merged commit f41207d into Snailclimb:main Apr 6, 2026
1 check passed
@Snailclimb Snailclimb added the doc-bug Content error label Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-bug Content error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

reids持久化机制解释

2 participants