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

No longer able to load backups into new cluster if there was a dropped column

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Duplicate
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Severity:
      Normal
    • Since Version:

      Description

      The following change to the sstableloader test works in 2.1/2.2 but fails in 3.0+

      https://github.com/JeremiahDJordan/cassandra-dtest/commit/7dc66efb8d24239f0a488ec5a613240531aeb7db

      CREATE TABLE test_drop (key text PRIMARY KEY, c1 text, c2 text, c3 text, c4 text)
      ...insert data...
      ALTER TABLE test_drop DROP c4
      ...insert more data...
      

      Make a snapshot and save off a describe to backup table test_drop.

      Decide to restore the snapshot to a new cluster. First restore the schema from describe. (column c4 isn't there)

      CREATE TABLE test_drop (key text PRIMARY KEY, c1 text, c2 text, c3 text)
      

      sstableload the snapshot data.

      Works in 2.1/2.2. Fails in 3.0+ with:

      java.lang.RuntimeException: Unknown column c4 during deserialization
      java.lang.RuntimeException: Failed to list files in /var/folders/t4/rlc2b6450qbg92762l9l4mt80000gn/T/dtest-3eKv_g/test/node1/data1_copy/ks/drop_one-bcef5280f11b11e5825a43f0253f18b5
      	at org.apache.cassandra.db.lifecycle.LogAwareFileLister.list(LogAwareFileLister.java:53)
      	at org.apache.cassandra.db.lifecycle.LifecycleTransaction.getFiles(LifecycleTransaction.java:544)
      	at org.apache.cassandra.io.sstable.SSTableLoader.openSSTables(SSTableLoader.java:76)
      	at org.apache.cassandra.io.sstable.SSTableLoader.stream(SSTableLoader.java:165)
      	at org.apache.cassandra.tools.BulkLoader.main(BulkLoader.java:104)
      Caused by: java.lang.RuntimeException: Unknown column c4 during deserialization
      	at org.apache.cassandra.db.SerializationHeader$Component.toHeader(SerializationHeader.java:331)
      	at org.apache.cassandra.io.sstable.format.SSTableReader.openForBatch(SSTableReader.java:430)
      	at org.apache.cassandra.io.sstable.SSTableLoader.lambda$openSSTables$193(SSTableLoader.java:121)
      	at org.apache.cassandra.db.lifecycle.LogAwareFileLister.lambda$innerList$184(LogAwareFileLister.java:75)
      	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
      	at java.util.TreeMap$EntrySpliterator.forEachRemaining(TreeMap.java:2965)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
      	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
      	at org.apache.cassandra.db.lifecycle.LogAwareFileLister.innerList(LogAwareFileLister.java:77)
      	at org.apache.cassandra.db.lifecycle.LogAwareFileLister.list(LogAwareFileLister.java:49)
      	... 4 more
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jjordan Jeremiah Jordan
              • Votes:
                1 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: