[
https://issues.apache.org/jira/browse/CASSANDRA-21092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18052483#comment-18052483
]
Paulo Motta commented on CASSANDRA-21092:
-----------------------------------------
I've simplified the patch to automatically detect legacy sstables instead of
requiring a manual flag. This is a simpler and more user-friendly approach.
Changes:
* Added version check in
CassandraOutgoingFile.computeShouldStreamEntireSSTables() that calls
descriptor.version.hasOldBfFormat() to detect sstables with the old bloom
filter format (pre-4.0)
* Removed the --disable-zero-copy-streaming flag from sstableloader since it's
no longer needed
* Simplified the test to verify automatic detection works
This follows the existing pattern in the same method that already checks for
hasLegacyCounterShards. The version information is readily available in the
sstable descriptor, making detection reliable and transparent to users.
Updated PRs:
- 5.0: [PR|https://github.com/apache/cassandra/pull/4544]
[CI|https://pre-ci.cassandra.apache.org/job/cassandra-5.0/59/]
- trunk: [PR|https://github.com/apache/cassandra/pull/4543]
[CI|https://pre-ci.cassandra.apache.org/job/cassandra/307/]
> Automatically disable zero-copy streaming for legacy sstables
> -------------------------------------------------------------
>
> Key: CASSANDRA-21092
> URL: https://issues.apache.org/jira/browse/CASSANDRA-21092
> Project: Apache Cassandra
> Issue Type: Bug
> Components: Tool/sstable
> Reporter: Paulo Motta
> Assignee: Paulo Motta
> Priority: Normal
> Time Spent: 20m
> Remaining Estimate: 0h
>
> When attempting to load legacy Cassandra 3.11 sstables into a Cassandra 5.0+
> cluster using sstableloader, the operation fails with a StreamException when
> zero-copy streaming is enabled (which is the default behavior). The root
> cause is an assertion error {{java.lang.AssertionError: Filter should not be
> serialized in old format at
> org.apache.cassandra.utils.BloomFilter.serialize(BloomFilter.java:67)}} that
> was introduced by CASSANDRA-17056 when it landed in the 5.0 branch.
> This is a regression from Cassandra 4.0 and 4.1, where zero-copy streaming
> works fine with legacy sstables. The changes in 5.0 introduced stricter
> validation that rejects the old bloom filter serialization format used in 3.x
> sstables, causing the streaming operation to fail.
> This patch automatically detects sstables with the old bloom filter format
> (pre-4.0) by checking descriptor.version.hasOldBfFormat() in
> CassandraOutgoingFile.computeShouldStreamEntireSSTables() and falls back to
> legacy streaming for those sstables. No user intervention required.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]