POC consistency check (DO NOT MERGE)
This implements a prototype approach for detecting and correcting partial updates that can occur as a result of an abrupt termination
Summary
If we acquire a write lock and writeInProgress is true it means the last lock holder did not complete the write, we then do a scan of the roll cycle to ensure the writePositionAndSequence table store header and index is consistent with the roll cycle state.
If we knew when the write lock was force-acquired we could probably do away with the writeInProgress flag, as a lingering write lock is a good indication that a consistency check is required.
Quality Gate passed
The SonarCloud Quality Gate passed, but some issues were introduced.
1 New issue
0 Security Hotspots
88.9% Coverage on New Code
0.0% Duplication on New Code
Superseded by https://github.com/OpenHFT/Chronicle-Queue/pull/1537