Repository navigation
Test phase 7: fault points and kill-and-restart; four durability fixes - #190
Merged
Merged
Conversation
Fault points (src/faults.rs, `failpoints` feature): parse.read now also takes OS errors (EMFILE) and delays (slow disk); new parse.panic, parse.symbols, watch.overflow, save.write and save.rename. Ten new tests in tests/fault_injection.rs. examples/chaos.rs kills the server binary with SIGKILL during a build, a load, a stream of edits, a periodic save, a burst and the shutdown save, restarts it and checks it loads the index, leaves no temp file, catches up and passes /api/check. New job "Kill and restart" in the scoreboard workflow. The scoreboard's server handling moves to examples/support/server.rs, shared by both. Fixed: - a killed save left its temp file (as large as the index) for good; the server now removes them when it takes the index lock; - a failed save (disk full) reset the unsaved-update count, so the shutdown skipped its save; - a failed rename deleted the old index before retrying; it is now moved aside and put back on a second failure; - a panic while reading or parsing a file during the build left it out silently; it is now retried and reported like an unreadable file. Also fsyncs the index folder after the rename on Unix. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EkCcM7SF9X6MgaCjoysdAw
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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. Comment |
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.
Phase 7 of the test plan (
reviews/test-strategy-2026-10-23.md): failpoints at the remaining I/O and panic sites, and akill -9chaos run against the real server binary.Fault points
src/faults.rs(failpointsfeature):parse.readnow also returns OS errors (EMFILE) and delays (slow disk); newparse.panic,parse.symbols,watch.overflow,save.write,save.rename. Ten new tests intests/fault_injection.rs: a file gone between listing and reading, out of file handles (build and watcher), read panics (once and always, build and watcher), a parser panic, lost OS events made up by a rescan, a slow disk not holding up searches, a failed save or rename keeping the old index whole, and updates whose save failed being saved at shutdown.Kill and restart
examples/chaos.rskills the server with SIGKILL during a build, a load, a stream of edits, a periodic save (0–20 ms after it begins), a burst and the shutdown save, then restarts and requires: the saved index loads (never rejected), no temp file left, the index catches up with every change,/api/check?all=trueclean, no crash. 60 rounds on 20,000 files locally: all recovered, 22 kills landed mid-save. New job "Kill and restart" in the "Scale scoreboard" workflow (40 rounds, seed 1 on PRs; 100 rounds nightly). The scoreboard's server handling moves toexamples/support/server.rs.Fixed
Docs: testing page section "Killed at any moment", persistence page, index format guarantees, CHANGELOG.
Generated by Claude Code