[ 
https://issues.apache.org/jira/browse/CASSANDRA-21780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Miklosovic updated CASSANDRA-21780:
------------------------------------------
    Description: 
SSTableWriter.Builder.addDefaultComponents chose CompressionInfo or CRC from 
the compression of the table, and the data writer read the compression of the 
table again when the builder opened it. An ALTER TABLE which enabled or 
disabled compression in between, e.g. while the flush it triggers or a 
compaction built a writer, made the two disagree: an sstable with 
CompressionInfo had its data written uncompressed and opening it failed with a 
ClassCastException, or an sstable with CRC had its data compressed and reading 
it failed as corrupted.

The builder should read the compression of the table once; the components and 
the data writer should then use it.

> Write an sstable with the compression its components were chosen for when 
> ALTER TABLE changes it
> ------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-21780
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-21780
>             Project: Apache Cassandra
>          Issue Type: Bug
>          Components: Feature/Compression
>            Reporter: Stefan Miklosovic
>            Priority: Normal
>
> SSTableWriter.Builder.addDefaultComponents chose CompressionInfo or CRC from 
> the compression of the table, and the data writer read the compression of the 
> table again when the builder opened it. An ALTER TABLE which enabled or 
> disabled compression in between, e.g. while the flush it triggers or a 
> compaction built a writer, made the two disagree: an sstable with 
> CompressionInfo had its data written uncompressed and opening it failed with 
> a ClassCastException, or an sstable with CRC had its data compressed and 
> reading it failed as corrupted.
> The builder should read the compression of the table once; the components and 
> the data writer should then use it.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to