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

sstabledump tries to delete a file

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: 3.0.17, 3.11.3, 4.0
    • Component/s: Legacy/Tools
    • Labels:
      None
    • Severity:
      Normal

      Description

      Directory /var/lib/cassandra/data/<keyspace>/<table> has cassandra:cassandra owner.
      An error happens when sstabledump executed on file in that directory by regular user:

      $ sstabledump mc-56801-big-Data.db
      Exception in thread "main" FSWriteError in /var/lib/cassandra/data/<keyspace>/<table>/mc-56801-big-Summary.db
              at org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:142)
              at org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:159)
              at org.apache.cassandra.io.sstable.format.SSTableReader.saveSummary(SSTableReader.java:935)
              at org.apache.cassandra.io.sstable.format.SSTableReader.saveSummary(SSTableReader.java:920)
              at org.apache.cassandra.io.sstable.format.SSTableReader.load(SSTableReader.java:788)
              at org.apache.cassandra.io.sstable.format.SSTableReader.load(SSTableReader.java:731)
              at org.apache.cassandra.io.sstable.format.SSTableReader.open(SSTableReader.java:516)
              at org.apache.cassandra.io.sstable.format.SSTableReader.openNoValidation(SSTableReader.java:396)
              at org.apache.cassandra.tools.SSTableExport.main(SSTableExport.java:191)
      Caused by: java.nio.file.AccessDeniedException: /var/lib/cassandra/data/<keyspace>/<table>/mc-56801-big-Summary.db
              at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
              at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
              at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
              at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244)
              at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103)
              at java.nio.file.Files.delete(Files.java:1126)
              at org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:136)
              ... 8 more
      
      

      I have changed bloom_filter_fp_chance for that table couple months ago, so I believe that's the reason why SSTableReader wants to recreate summary file. But when used in sstabledump it should not try to modify / delete any files.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                KurtG Kurt Greaves
                Reporter:
                Python_Max Python_Max
                Authors:
                Kurt Greaves
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: