Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-15238

Verifier does not detect out-of-order cells (while Scrubber does)

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Triage Needed
    • Priority: Normal
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: Tool/nodetool
    • Labels:
      None
    • Bug Category:
      Correctness - Recoverable Corruption / Loss
    • Platform:
      All

      Description

      Hello,

      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:

      //mimic the scrub read path
      new SSTableIdentityIterator(sstable, dataFile, key, true);
      

      Thanks in advance for your feedback and consideration,
      Giacomo

        Attachments

        1. verifier.patch
          29 kB
          Giacomo Lo Giusto

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              giacomo.logiusto Giacomo Lo Giusto
              Authors:
              Giacomo Lo Giusto
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: