You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Aleksey Yeschenko (Jira)" <ji...@apache.org> on 2021/03/02 14:24:00 UTC
[jira] [Updated] (CASSANDRA-16435) Reverse iteration with paging
may throw if the page boundary coincides with open tombstone boundary
[ https://issues.apache.org/jira/browse/CASSANDRA-16435?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aleksey Yeschenko updated CASSANDRA-16435:
------------------------------------------
Status: Ready to Commit (was: Changes Suggested)
> Reverse iteration with paging may throw if the page boundary coincides with open tombstone boundary
> ---------------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-16435
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16435
> Project: Cassandra
> Issue Type: Bug
> Components: Consistency/Coordination
> Reporter: Alex Petrov
> Assignee: Alex Petrov
> Priority: Normal
>
> If sstable contains a tombstone that has an open bound which coincides with current page bound, we’ll generate an impossible empty slice range.
>
> Minimal repro:
>
> {code}
> try (Cluster cluster = init(builder().withNodes(3).start()))
> {
> cluster.schemaChange("CREATE TABLE " + KEYSPACE + ".tbl (pk int, ck int, regular int, PRIMARY KEY (pk, ck))");
> cluster.coordinator(1).execute("DELETE FROM " + KEYSPACE + ".tbl WHERE pk = 1 AND ck > 1 AND ck < 10", ConsistencyLevel.ALL);
> cluster.coordinator(1).execute("insert into " + KEYSPACE + ".tbl (pk, ck, regular) values (1,1,1)", ConsistencyLevel.ALL);
> cluster.coordinator(1).execute("insert into " + KEYSPACE + ".tbl (pk, ck, regular) values (1,2,2)", ConsistencyLevel.ALL);
> cluster.coordinator(1).execute("insert into " + KEYSPACE + ".tbl (pk, ck, regular) values (1,3,3)", ConsistencyLevel.ALL);
> cluster.stream().forEach(n -> {
> n.nodetool("flush");
> });
> Iterator<Object[]> iter = cluster.coordinator(1).executeWithPaging("SELECT pk,ck,regular FROM " + KEYSPACE + ".tbl " +
> "WHERE pk=? AND ck>=? ORDER BY ck DESC;",
> ConsistencyLevel.QUORUM, 1,
> 1,1);
> while (iter.hasNext())
> {
> System.out.println(Arrays.toString(iter.next()));
> }
> }
> {code}
> Stack trace:
>
> {code}
> Caused by: java.lang.IllegalArgumentException: [1, 1)
> at com.google.common.base.Preconditions.checkArgument(Preconditions.java:141)
> at org.apache.cassandra.db.Slices.with(Slices.java:66)
> at org.apache.cassandra.db.columniterator.SSTableReversedIterator$ReverseReader.setIterator(SSTableReversedIterator.java:140)
> at org.apache.cassandra.db.columniterator.SSTableReversedIterator$ReverseReader.setForSlice(SSTableReversedIterator.java:134)
> at org.apache.cassandra.db.columniterator.AbstractSSTableIterator.<init>(AbstractSSTableIterator.java:118)
> at org.apache.cassandra.db.columniterator.SSTableReversedIterator.<init>(SSTableReversedIterator.java:52)
> at org.apache.cassandra.io.sstable.format.big.BigTableReader.iterator(BigTableReader.java:75)
> at org.apache.cassandra.io.sstable.format.big.BigTableReader.iterator(BigTableReader.java:67)
> at org.apache.cassandra.db.rows.UnfilteredRowIteratorWithLowerBound.initializeIterator(UnfilteredRowIteratorWithLowerBound.java:100)
> at org.apache.cassandra.db.rows.LazilyInitializedUnfilteredRowIterator.maybeInit(LazilyInitializedUnfilteredRowIterator.java:48)
> at org.apache.cassandra.db.rows.LazilyInitializedUnfilteredRowIterator.partitionLevelDeletion(LazilyInitializedUnfilteredRowIterator.java:81)
> at org.apache.cassandra.db.rows.UnfilteredRowIteratorWithLowerBound.partitionLevelDeletion(UnfilteredRowIteratorWithLowerBound.java:161)
> at org.apache.cassandra.db.SinglePartitionReadCommand.queryMemtableAndDiskInternal(SinglePartitionReadCommand.java:672)
> at org.apache.cassandra.db.SinglePartitionReadCommand.queryMemtableAndDisk(SinglePartitionReadCommand.java:566)
> at org.apache.cassandra.db.SinglePartitionReadCommand.queryStorage(SinglePartitionReadCommand.java:400)
> at org.apache.cassandra.db.ReadCommand.executeLocally(ReadCommand.java:460)
> at org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:2011)
> at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2725)
> ... 5 common frames omitted
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org