jiengup opened a new pull request, #4253:
URL: https://github.com/apache/iggy/pull/4253

   ## Which issue does this PR address?
   
   Closes #4141
   Relates to #4252
   
   ## Rationale
   
   Linux reports delayed writeback errors through per-open-file error
   cursors. A checkpoint that reopens a materialized path after the error
   can miss it and reclaim the WAL after the original writer lost bytes.
   
   ## What changed?
   
   Checkpoint mutations now carry durability barriers tied to the original
   writers. Active indexes keep their existing synchronous fence and pass
   an internal already-synced barrier, while simulator barriers retain the
   original `SimFile` until the checkpoint mutation runs.
   
   Every supplied barrier completes before path and directory barriers and
   before WAL checkpoint publication. The simulator now covers the original
   #4141 failure and multiple writers for one file, and records the related
   install-backup gap from #4252 as an ignored follow-up regression.
   
   ## Local Execution
   
   Passed:
   
   - `cargo fmt --all`
   - `cargo sort --no-format --workspace`
   - `cargo check -p partitions --no-default-features`
   - `cargo clippy --all-features --all-targets -- -D warnings`
   - `cargo test -p journal --lib`
     - 95 passed, 0 failed
   - `cargo test -p partitions --lib`
     - 304 passed, 0 failed, 3 ignored
   - `cargo test -p simulator --lib`
     - 150 passed, 0 failed, 4 ignored
   - `./scripts/ci/taplo.sh --check`
   - `git diff --check`
   
   The #4141 regression was confirmed red before the implementation and
   passes after the fix:
   
   ```bash
   cargo test -p simulator --lib \
     
given_a_failed_writeback_when_checkpointing_then_wal_history_should_not_be_reclaimed
   ```
   
   The ignored #4252 regression was also confirmed to fail for the expected
   reason: `install_backup::link_tree` publishes the backup after syncing a
   fresh hard-link handle that sampled past the original writer's error.
   #4252 works as a follow-up issue which will not block this PR.
   
   ## AI Usage
   
   1. Tool: OpenAI Codex through Delta.
   2. Scope: root-cause analysis, checkpoint barrier design, implementation,
      deterministic regression tests, and repository-wide storage-path audit.
   3. Verification: red-green regression runs, journal/partitions/simulator
      unit suites, full workspace Clippy, formatting, Cargo sorting, and TOML
      checks.
   4. I can explain every changed line if asked.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to