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

Ensure a directory is selected for Compaction

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 1.0.10, 1.1.1
    • None
    • None
    • Low

    Description

      From http://www.mail-archive.com/user@cassandra.apache.org/msg20757.html

      CompactionTask.execute() checks if there is a valid compactionFileLocation only if partialCompactionsAcceptable() . upgradesstables results in a CompactionTask with userdefined set, so the valid location check is not performed.

      The result is a NPE, partial stack

      $ nodetool -h localhost upgradesstables
      Error occured while upgrading the sstables for keyspace MyKeySpace
      java.util.concurrent.ExecutionException: java.lang.NullPointerException
              at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
              at java.util.concurrent.FutureTask.get(FutureTask.java:83)
              at org.apache.cassandra.db.compaction.CompactionManager.performAllSSTableOperation(CompactionManager.java:203)
              at org.apache.cassandra.db.compaction.CompactionManager.performSSTableRewrite(CompactionManager.java:219)
              at org.apache.cassandra.db.ColumnFamilyStore.sstablesRewrite(ColumnFamilyStore.java:995)
              at org.apache.cassandra.service.StorageService.upgradeSSTables(StorageService.java:1648)
      <snip>
      Caused by: java.lang.NullPointerException
              at java.io.File.<init>(File.java:222)
              at org.apache.cassandra.db.ColumnFamilyStore.getTempSSTablePath(ColumnFamilyStore.java:641)
              at org.apache.cassandra.db.ColumnFamilyStore.getTempSSTablePath(ColumnFamilyStore.java:652)
              at org.apache.cassandra.db.ColumnFamilyStore.createCompactionWriter(ColumnFamilyStore.java:1888)
              at org.apache.cassandra.db.compaction.CompactionTask.execute(CompactionTask.java:151)
              at org.apache.cassandra.db.compaction.CompactionManager$4.perform(CompactionManager.java:229)
              at org.apache.cassandra.db.compaction.CompactionManager$2.call(CompactionManager.java:182)
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
              at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      

      (night time here, will fix tomorrow, anyone else feel free to fix it.)

      Attachments

        1. 3985-2.txt
          8 kB
          Jonathan Ellis
        2. cassandra-1.0-3985.txt
          9 kB
          Aaron Morton

        Activity

          People

            jbellis Jonathan Ellis
            amorton Aaron Morton
            Jonathan Ellis
            Pavel Yaskevich
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: