Repository navigation
Merge main into v3 (#516) - #517
Merged
Merged
Conversation
Backport of #514 from v3. WAL replay stops at the first partial or damaged entry, but the writer appended at the end of the file. After a crash during an append, the next session's commits went in after the partial entry, so a second crash before any checkpoint lost them although each was fsynced and reported committed. A failed append in a running process did the same to the next commit through that handle. - WalWriter::open_or_create cuts an existing WAL back to the end of its last valid entry and syncs it before appending (scan_entries, shared with WalReader::read_entries). - After a failed write or sync, the writer refuses every later append with the new WAL-007 (same code as v3). A checkpoint or a reopen starts a clean writer. A rejected oversize fact (WAL-003) does not poison it. Same tests as on v3 (the oversize fact uses v2's MAX_FACT_BYTES). Refs #513 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012wXxZguv7PgKQjMMH4yJ5h
fix(wal): never append after a torn WAL entry (#513, v2.x backport)
# Conflicts: # CHANGELOG.md # CLAUDE.md # README.md # docs/TEST_COVERAGE.md # src/db.rs # src/wal.rs
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the #513 v2.x backport (#516) from
mainintov3, as a merge commit. Every conflict (src/wal.rs,src/db.rs, CHANGELOG, CLAUDE.md, README, TEST_COVERAGE) resolves tov3's side, which already has the fix from #514 and later changes from #515. The merged tree is identical tov3(git diff origin/v3is empty).🤖 Generated with Claude Code
https://claude.ai/code/session_012wXxZguv7PgKQjMMH4yJ5h