[ 
https://issues.apache.org/jira/browse/CASSANDRA-15336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16943812#comment-16943812
 ] 

Shalom commented on CASSANDRA-15336:
------------------------------------

Hi [~benedict]

I tried to use the 3.11 branch and unfortunately was able to reproduce the bug.

I've double and triple checked that the fix was there and that I used the 
correct branch (pasted it below).

 

I'm a bit stressed about this matter because I have a planned upgrade this 
coming Sunday and will be super happy if it works flawlessly. 

I believe that once all nodes are upgraded though, the issue will be gone. Is 
my assumption correct?

Thanks!

...

for (int i = 0; i < this.size; i++)
 {
 LegacyBound start = starts[i];
 LegacyBound end = ends[i];

CompositeType.Builder startBuilder = type.builder();
 CompositeType.Builder endBuilder = type.builder();
 *{color:#FF0000}for (int j = 0; j < start.bound.size(); j++){color}*
 *{color:#FF0000}startBuilder.add(start.bound.get(j));{color}*
 *{color:#FF0000}for (int j = 0; j < end.bound.size(); j++){color}*
 *{color:#FF0000}endBuilder.add(end.bound.get(j));{color}*

if (start.collectionName != null)
 startBuilder.add(start.collectionName.name.bytes);
 if (end.collectionName != null)
 endBuilder.add(end.collectionName.name.bytes);

size += ByteBufferUtil.serializedSizeWithShortLength(startBuilder.build());
 size += 
ByteBufferUtil.serializedSizeWithShortLength(endBuilder.buildAsEndOfRange());

...

 

> LegacyLayout RangeTombstoneList throws IndexOutOfBoundsException When Running 
> Range Queries
> -------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-15336
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15336
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Shalom
>            Assignee: Benedict Elliott Smith
>            Priority: Normal
>
> Hi All, 
> This bug is similar to https://issues.apache.org/jira/browse/CASSANDRA-15172 
> but relates specifically to range queries running over range tombstones. 
>  
>  
> *+Steps to Reproduce:
>  +*
> CREATE KEYSPACE ks1 WITH replication = \{'class': 'NetworkTopologyStrategy', 
> 'DC1': '3'} AND durable_writes = true;
> +*TABLE:*+ 
>  CREATE TABLE ks1.table1 (
>  col1 text,
>  col2 text,
>  col3 text,
>  col4 text,
>  col5 text,
>  col6 timestamp,
>  data text,
>  PRIMARY KEY ((col1, col2, col3), col4, col5, col6)
>  );
>  
> Inserted ~4 million rows and created range tombstones by deleting ~1 million 
> rows.
>  
> +*Create Data*+
> _insert into ks1.table1 (col1, col2 , col3 , col4 , col5 , col6 , data ) 
> VALUES ( '1', '11', '21', '1', 'a', 12312312300000, 'data');_
>  _insert into ks1.table1 (col1, col2 , col3 , col4 , col5 , col6 , data ) 
> VALUES ( '1', '11', '21', '2', 'a', 12312312300000, 'data');_
>  _insert into ks1.table1 (col1, col2 , col3 , col4 , col5 , col6 , data ) 
> VALUES ( '1', '11', '21', '3', 'a', 12312312300000, 'data');_
>  _insert into ks1.table1 (col1, col2 , col3 , col4 , col5 , col6 , data ) 
> VALUES ( '1', '11', '21', '4', 'a', 12312312300000, 'data');_
>  _insert into ks1.table1 (col1, col2 , col3 , col4 , col5 , col6 , data ) 
> VALUES ( '1', '11', '21', '5', 'a', 12312312300000, 'data');_
>  
> +*Create Range Tombstones*+
> delete from ks1.table1 where col1='1' and col2='11' and col3='21' and 
> col4='1';
>  
> +*Query Live Rows (no tombstones)*+
> _select * from ks1.table1 where col1='1' and col2='201' and col3='21' and 
> col4='1' and col5='a' and *col6>12312312300000*;_
> No issues found, everything is running properly.
>  
> +*Query Range Tombstones*+
> _select * from ks1.table1 where col1='1' and col2='11' and col3='21' and 
> col4='1' and col5='a' and *col6=12312312300000*;_
> No issues found, everything is running properly.
>  
> +BUT when running range queries:+
> _select * from ks1.table1 where col1='1' and col2='11' and col3='21' and 
> col4='1' and col5='a' and *col6>12312312200000;*_
> WARN [ReadStage-1] 2019-09-23 14:17:10,281 
> AbstractLocalAwareExecutorService.java:167 - Uncaught exception on thread 
> Thread[ReadStage-1,5,main]: {}
>  java.lang.ArrayIndexOutOfBoundsException: 2
>  at 
> org.apache.cassandra.db.AbstractBufferClusteringPrefix.get(AbstractBufferClusteringPrefix.java:55)
>  at 
> org.apache.cassandra.db.LegacyLayout$LegacyRangeTombstoneList.serializedSizeCompound(LegacyLayout.java:2545)
>  at 
> org.apache.cassandra.db.LegacyLayout$LegacyRangeTombstoneList.serializedSize(LegacyLayout.java:2522)
>  at 
> org.apache.cassandra.db.LegacyLayout.serializedSizeAsLegacyPartition(LegacyLayout.java:565)
>  at 
> org.apache.cassandra.db.ReadResponse$Serializer.serializedSize(ReadResponse.java:446)
>  at 
> org.apache.cassandra.db.ReadResponse$Serializer.serializedSize(ReadResponse.java:352)
>  at org.apache.cassandra.net.MessageOut.payloadSize(MessageOut.java:171)
>  at 
> org.apache.cassandra.net.OutboundTcpConnectionPool.getConnection(OutboundTcpConnectionPool.java:77)
>  at 
> org.apache.cassandra.net.MessagingService.getConnection(MessagingService.java:802)
>  at 
> org.apache.cassandra.net.MessagingService.sendOneWay(MessagingService.java:953)
>  at 
> org.apache.cassandra.net.MessagingService.sendReply(MessagingService.java:929)
>  at 
> org.apache.cassandra.db.ReadCommandVerbHandler.doVerb(ReadCommandVerbHandler.java:62)
>  at 
> org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:66)
>  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>  at 
> org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:162)
>  at 
> org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSessionFutureTask.run(AbstractLocalAwareExecutorService.java:134)
>  at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:114)
>  at java.lang.Thread.run(Thread.java:745)
>  
> This WARN is constantly generated until I stop the range queries script.
> Hope this helps..
> Thanks!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to