Re: sstabledump tries to delete a file

2018-01-12 Thread Python_Max
Done https://issues.apache.org/jira/browse/CASSANDRA-14166

On Wed, Jan 10, 2018 at 8:49 PM, Chris Lohfink  wrote:

> Yes it should be read only, open a jira please. It does look like if the
> fp changed it would rebuild or if your missing. When it builds the table
> metadata from the sstable it can just set the properties to match that of
> the sstable to prevent this.
>
> Chris
>
> On Wed, Jan 10, 2018 at 4:16 AM, Python_Max  wrote:
>
>> Hello all.
>>
>> I have an error when trying to dump SSTable (Cassandra 3.11.1):
>>
>> $ sstabledump mc-56801-big-Data.db
>> Exception in thread "main" FSWriteError in /var/lib/cassandra/data/> ace>//mc-56801-big-Summary.db
>> at org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(Fil
>> eUtils.java:142)
>> at org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(Fil
>> eUtils.java:159)
>> at org.apache.cassandra.io.sstable.format.SSTableReader.saveSum
>> mary(SSTableReader.java:935)
>> at org.apache.cassandra.io.sstable.format.SSTableReader.saveSum
>> mary(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.openNoV
>> alidation(SSTableReader.java:396)
>> at org.apache.cassandra.tools.SSTableExport.main(SSTableExport.
>> java:191)
>> Caused by: java.nio.file.AccessDeniedException:
>> /var/lib/cassandra/data///mc-56801-big-Summary.db
>> at sun.nio.fs.UnixException.translateToIOException(UnixExceptio
>> n.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(UnixFileSystemP
>> rovider.java:244)
>> at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSys
>> temProvider.java:103)
>> at java.nio.file.Files.delete(Files.java:1126)
>> at org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(Fil
>> eUtils.java:136)
>> ... 8 more
>>
>> Seems that sstabledump tries to delete and recreate summary file which I
>> think is risky because external modification to files that should be
>> modified only by Cassandra itself can lead to unpredictable behavior.
>> When I copy all related files and change it's owner to myself and run
>> sstabledump in that directory then Summary.db file is recreated but it's
>> md5 is exactly the same as original Summary.db's file.
>>
>> I indeed have changed bloom_filter_fp_chance couple months ago, so I
>> believe that's the reason why SSTableReader wants to recreate summary file.
>>
>> After nodetool scrub an error still happens.
>>
>> I have not found any issues like this in bug tracker.
>> Shouldn't sstabledump be read only?
>>
>> --
>> Best regards,
>> Python_Max.
>>
>
>


-- 
Best regards,
Python_Max.


Re: sstabledump tries to delete a file

2018-01-10 Thread Chris Lohfink
Yes it should be read only, open a jira please. It does look like if the fp
changed it would rebuild or if your missing. When it builds the table
metadata from the sstable it can just set the properties to match that of
the sstable to prevent this.

Chris

On Wed, Jan 10, 2018 at 4:16 AM, Python_Max  wrote:

> Hello all.
>
> I have an error when trying to dump SSTable (Cassandra 3.11.1):
>
> $ sstabledump mc-56801-big-Data.db
> Exception in thread "main" FSWriteError in /var/lib/cassandra/data/<
> keyspace>//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>//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
>
> Seems that sstabledump tries to delete and recreate summary file which I
> think is risky because external modification to files that should be
> modified only by Cassandra itself can lead to unpredictable behavior.
> When I copy all related files and change it's owner to myself and run
> sstabledump in that directory then Summary.db file is recreated but it's
> md5 is exactly the same as original Summary.db's file.
>
> I indeed have changed bloom_filter_fp_chance couple months ago, so I
> believe that's the reason why SSTableReader wants to recreate summary file.
>
> After nodetool scrub an error still happens.
>
> I have not found any issues like this in bug tracker.
> Shouldn't sstabledump be read only?
>
> --
> Best regards,
> Python_Max.
>