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

CFS.scrubDataDirectories tries to delete nonexistent orphans

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Fix Version/s: 1.1.11, 1.2.3
    • Component/s: None
    • Labels:

      Description

      The check only looks for a missing data file, then deletes all other components, however it's possible for the data file and another component to be missing, causing an error:

       WARN 17:19:28,765 Removing orphans for /var/lib/cassandra/data/system/HintsColumnFamily/system-HintsColumnFamily-hd-24492: [Index.db, Filter.db, Digest.sha1, Statistics.db, Data.db]
      ERROR 17:19:28,766 Exception encountered during startup
      java.lang.AssertionError: attempted to delete non-existing file system-HintsColumnFamily-hd-24492-Index.db
              at org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:49)
              at org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:44)
              at org.apache.cassandra.db.ColumnFamilyStore.scrubDataDirectories(ColumnFamilyStore.java:357)
              at org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:167)
              at org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:352)
              at org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:105)
      java.lang.AssertionError: attempted to delete non-existing file system-HintsColumnFamily-hd-24492-Index.db
              at org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:49)
              at org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:44)
              at org.apache.cassandra.db.ColumnFamilyStore.scrubDataDirectories(ColumnFamilyStore.java:357)
              at org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:167)
              at org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:352)
              at org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:105)
      Exception encountered during startup: attempted to delete non-existing file system-HintsColumnFamily-hd-24492-Index.db
      

        Attachments

        1. 4021.txt
          0.8 kB
          Brandon Williams
        2. node1.log
          23 kB
          Brandon Williams
        3. patch_4021.txt
          1 kB
          Jonathan Ellis

          Issue Links

            Activity

              People

              • Assignee:
                yulinyen Boris Yen
                Reporter:
                brandon.williams Brandon Williams
                Reviewer:
                Jonathan Ellis
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: