Skip to content

docs(persistence): retire stale WAL v2 references — v3 shipped, v2 removed#372

Merged
pilotspacex-byte merged 1 commit into
mainfrom
docs/wal-v3-stale-refs
Jul 17, 2026
Merged

docs(persistence): retire stale WAL v2 references — v3 shipped, v2 removed#372
pilotspacex-byte merged 1 commit into
mainfrom
docs/wal-v3-stale-refs

Conversation

@pilotspacex-byte

@pilotspacex-byte pilotspacex-byte commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Found while answering "do the docs and defaults support long-term data storage?": docs/guides/persistence.md still documented a WAL v2 format section and docs/comparison-valkey.md cited src/persistence/wal.rs — both removed when the engine went WAL-v3-only (PRs #236/#238). Anyone evaluating Moon's durability story from the docs was reading a format that no longer exists. Both now describe WAL v3 (src/persistence/wal_v3/): segmented 16MB files, per-record LSNs, checksummed records, lz4 FPI, off-loop fsync agent. Docs-only change.

Summary by CodeRabbit

  • Documentation
    • Updated the persistence guide to document WAL v3, including segmented files, per-record tracking, checksums, compression, corruption isolation, and asynchronous syncing.
    • Updated the Valkey comparison to reflect per-shard WAL v3 behavior and references.
    • Revised the changelog to reflect the current persistence documentation.

…moved

docs/guides/persistence.md carried a "WAL v2 format" section and
docs/comparison-valkey.md cited "Per-shard WAL v2
(src/persistence/wal.rs)" — that file and format were removed when the
engine went WAL-v3-only (PRs #236/#238). Anyone evaluating Moon's
durability story from the docs was reading a format that no longer
exists. Both now describe WAL v3 (src/persistence/wal_v3/): segmented
16MB files with 64-byte headers, per-record LSNs (PITR/CDC foundation),
checksummed records, lz4-compressed FPI, and the off-loop fsync agent.

author: Tin Dang <tindang.ht97@gmail.com>
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Persistence documentation and changelog references are updated from WAL v2 to WAL v3, covering segmented files, LSN tracking, checksums, lz4 full-page images, corruption isolation, and off-loop fsync handling.

Changes

WAL v3 documentation

Layer / File(s) Summary
WAL v3 persistence documentation
docs/guides/persistence.md, docs/comparison-valkey.md, CHANGELOG.md
Persistence guides and comparison tables now describe WAL v3 format and fsync behavior, update the WAL source reference, and record the documentation change in the changelog.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

  • pilotspace/moon#115: Updates related Moon persistence specifications around WAL v3 and storage format documentation.

Suggested reviewers: tindang97

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the change, but it does not follow the required template sections or include the checklist, impact, or notes fields. Rewrite the PR description using the template: Summary, Checklist, Performance Impact, and Notes, and fill in the required status details.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the doc update replacing stale WAL v2 references with WAL v3.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/wal-v3-stale-refs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/guides/persistence.md`:
- Around line 47-48: Clarify the “Off-loop fsync” statement in the persistence
guide to specify that the sync agent performs fdatasync off the shard event
loop, while wait_durable(lsn, timeout) may still block it for checkpoint
ordering and shutdown. Replace the overly broad claim that the event loop never
blocks on durability waits with wording that preserves this distinction.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 422444b8-1d7d-4377-8c0b-841ad1a5dd88

📥 Commits

Reviewing files that changed from the base of the PR and between 5b801b0 and 87263c2.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • docs/comparison-valkey.md
  • docs/guides/persistence.md

Comment on lines +47 to +48
- **Off-loop fsync** — a per-shard sync agent thread owns the fsync so the
shard event loop never blocks on durability waits

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Clarify the off-loop fsync guarantee.

The sync agent moves fdatasync off the shard thread, but wait_durable(lsn, timeout) still blocks the shard thread for checkpoint ordering and shutdown. “Never blocks on durability waits” is therefore too broad.

Proposed wording
--  shard event loop never blocks on durability waits
+-  regular fsync work runs off-loop; explicit durability waits remain for
+  checkpoint ordering and shutdown
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- **Off-loop fsync** — a per-shard sync agent thread owns the fsync so the
shard event loop never blocks on durability waits
- **Off-loop fsync** — a per-shard sync agent thread owns the fsync so the
regular fsync work runs off-loop; explicit durability waits remain for
checkpoint ordering and shutdown
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/guides/persistence.md` around lines 47 - 48, Clarify the “Off-loop
fsync” statement in the persistence guide to specify that the sync agent
performs fdatasync off the shard event loop, while wait_durable(lsn, timeout)
may still block it for checkpoint ordering and shutdown. Replace the overly
broad claim that the event loop never blocks on durability waits with wording
that preserves this distinction.

@pilotspacex-byte
pilotspacex-byte merged commit bd81a9d into main Jul 17, 2026
3 checks passed
@TinDang97
TinDang97 deleted the docs/wal-v3-stale-refs branch July 17, 2026 08:39
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.

2 participants