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

Avoid sstable corruption when upgrading from 4.0-rc1 to 4.0.0

    XMLWordPrintableJSON

Details

    • Correctness - Recoverable Corruption / Loss
    • Critical
    • Normal
    • Adhoc Test
    • All
    • None
    • Hide

      jvm dtest, cci run

      Show
      jvm dtest, cci run

    Description

      4.0-rc2 introduced a new sstable version (nb), adding a field in StatsMetadata. When zero copy streaming a file from 4.0-rc2+ to 4.0-rc1, the rc1 node will write it as an nb file, mutate the metadata to clear repairedAt/level information from StatsMetadata and rewrite the file, keeping the same file name. Problem is that since rc1 doesn't know about the new field in StatsMetadata, it will write the file without the new StatsMetadata field, but with an nb filename. Then, when upgrading this node to rc2+ we will try to read it as a nb file, but will get EOFException since it doesn't contain the new field.

      We should make sure that we never do zero-copy streaming to nodes that don't know about the file version.

      The corrupt sstables can be fixed by simply renaming all components of it to na from nb

      Attachments

        Issue Links

          Activity

            People

              marcuse Marcus Eriksson
              marcuse Marcus Eriksson
              Marcus Eriksson
              Caleb Rackliffe
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: