Status: Triage Needed
Fix Version/s: None
Bug Category:Correctness - Recoverable Corruption / Loss
This change was tested only for version 2.2.13.
We noticed the nodetool verify -e command was not able to detect corrupt SSTables that exhibited out-of-order cells within a row.
This is in contrast to the nodetool scrub command, which was able to detect and scrub such corrupted data files.
The proposed changes (see attached patch) include:
- Reusing Scrub's OrderCheckerIterator in the Verifier (for its extended use).
- Some added logging to better debug what was the cause of the verification failure and which key first showed the issue.
- Added unit tests for the Verifier (VerifyTest.java).
(Some other unrelated test where sometimes failing on our end and were therefore changed to enhance their deterministic behavior).
Please let me know if the change has value and is correct and safe for all possible configurations. Should we introduce an extra flag to enable the extra cell ordering check?
In the Verifier code there was this line (n. 189) that seemed to suggest that the newly introduced check was in fact an intended behavior all along, although we could not replicate this behavior neither in unit test nor with our production data:
Thanks in advance for your feedback and consideration,