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

   Purge can record its applied generation after synchronizing a consumer 
offset directory fails. The offset files have disappeared from the live 
filesystem, but their deletion has not been confirmed durable. Recording 
completion at that point can prevent reconciliation from retrying cleanup after 
a crash.
   
   Refs #4128.
   
   This draft adds regression coverage based on `master` at 
`e0027506f2a0379ee3bb5508427ff570e3a9a435`. It contains no production fix. The 
existing fault injection for offset directory synchronization is shared with 
the purge path and counted so each failure test verifies that it reached the 
intended I/O error.
   
   The fixture persists offsets for an individual consumer and a consumer 
group, records applied generation `4`, and requests purge generation `5`. It 
verifies that the real unlinks succeed, then hydrates the generation into a 
fresh partition using the production recovery method.
   
   - One regression injects failure when synchronizing the individual consumer 
directory.
   - Another injects failure when synchronizing the consumer group directory.
   - A control performs both synchronizations successfully and verifies 
completion.
   
   The assertion compares `(purge_succeeded, applied_generation, 
recovered_generation)`. Both failure cases expect `(false, 4, 4)`, preserving 
the pending cleanup obligation. Existing behavior produces `(true, 5, 5)`: 
purge returns success and advances the generation in memory and on disk despite 
the failed barrier. The control expects `(true, 5, 5)` and passes.
   
   The two regressions intentionally remain red until the correctness fault is 
fixed. Failing CI is expected for this draft reproducer. It demonstrates 
incorrect completion after a failed durability barrier; it does not simulate 
actual power loss or resurrection of deleted files.
   
   Run the focused reproduction with:
   
   ```sh
   cargo test -p partitions purge_offset_directory_sync_tests -- --nocapture
   ```
   
   Verification on macOS against the stated master commit produced one passing 
control and two expected failures. The full partitions library suite produced 
272 passes and only the same two failures. Formatting, dependency ordering, 
Clippy for partitions with all features and targets, and whitespace checks pass.
   
   Full workspace Clippy stops at existing `unused_self` and 
`unnecessary_wraps` findings in `core/server/src/shard_allocator.rs`. The Taplo 
script requires Bash 4.2 or newer and could not run with the available Bash 
3.2. No TOML files are changed.
   


-- 
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