[
https://issues.apache.org/jira/browse/CASSANDRA-17698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17683354#comment-17683354
]
Andres de la Peña commented on CASSANDRA-17698:
-----------------------------------------------
The patch mostly looks good to me. However, it changes the sstables in a way
that breaks backward compatibility. Thus, sstables created with the patched
version would produce a server startup failure with the unpatched version. I
understand that requires [a major sstable version
bump|https://github.com/apache/cassandra/blob/cassandra-4.1.0/src/java/org/apache/cassandra/io/sstable/format/big/BigFormat.java#L124].
Those type of major sstables changes can only be done on major releases. So the
current patch should go in 5.0 only. However, I think we don't have a branch
for 5.0. Instead, the current {{trunk}} branch in for 4.2. It seems that it
will become 5.0 when we have a breaking change that justifies the bump to a
major. That bump to 5.0 is meant to be done in CASSANDRA-17973. See [this mail
list
discussion|https://www.mail-archive.com/[email protected]/msg19516.html]
for context.
{quote}what about just fix this patch (what I will doing some modification
latter for trunk), and left the older branches unchanged?
{quote}
I think we should try to fix the bug for older branches in a way that doesn't
break sstables backward compatibility. Possibly by just JSON-printing the
failing clustering key as raw bytes, [this
way|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/marshal/BytesType.java#L70-L73].
If we don't want to do it here we can open a separate ticket and set the fix
version of this ticket as 5.0, making this depend on CASSANDRA-17973.
[~blambov] [~smiklosovic] wdyt?
> sstabledump errors when dumping data from index
> -----------------------------------------------
>
> Key: CASSANDRA-17698
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17698
> Project: Cassandra
> Issue Type: Bug
> Components: Tool/sstable
> Reporter: Stefan Miklosovic
> Assignee: maxwellguo
> Priority: Normal
> Fix For: 4.2
>
> Time Spent: 12h 40m
> Remaining Estimate: 0h
>
> {code:java}
> cqlsh> CREATE KEYSPACE ks1 WITH replication = {'class': 'SimpleStrategy',
> 'replication_factor': 1};
> cqlsh> CREATE TABLE ks1.tb1 ( id text, name text, primary key (id));
> cqlsh> CREATE INDEX IF NOT EXISTS ON ks1.tb1(name);
> cqlsh> INSERT INTO ks1.tb1 (id, name ) VALUES ( '1', 'Joe');
> cqlsh> exit
> ./bin/nodetool flush
> ./tools/bin/sstabledump
> data/data/ks1/tb1-1c3c5f10ee4711ecab82eda2f44200b3/.tb1_name_idx/nb-1-big-Data.db
>
> [
> {
> "partition" : {
> "key" : [ "Joe" ],
> "position" : 0
> },
> "rows" : [
> {
> "type" : "row",
> "position" : 17,
> "clustering" : [ ] } ] } ]Exception in thread "main"
> java.lang.UnsupportedOperationException
> at
> org.apache.cassandra.db.marshal.PartitionerDefinedOrder.toJSONString(PartitionerDefinedOrder.java:87)
> at
> org.apache.cassandra.db.marshal.AbstractType.toJSONString(AbstractType.java:187)
> at
> org.apache.cassandra.tools.JsonTransformer.serializeClustering(JsonTransformer.java:372)
> at
> org.apache.cassandra.tools.JsonTransformer.serializeRow(JsonTransformer.java:269)
> at
> org.apache.cassandra.tools.JsonTransformer.serializePartition(JsonTransformer.java:235)
> at
> java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
> at
> java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
> at java.util.Iterator.forEachRemaining(Iterator.java:116)
> at
> java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
> at
> java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
> at
> java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
> at
> java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
> at
> java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
> at
> java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
> at
> java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
> at
> org.apache.cassandra.tools.JsonTransformer.toJson(JsonTransformer.java:113)
> at
> org.apache.cassandra.tools.SSTableExport.main(SSTableExport.java:214) {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]