[ https://issues.apache.org/jira/browse/CASSANDRA-15343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alex Petrov updated CASSANDRA-15343: ------------------------------------ Description: {code} sandra@cqlsh> create keyspace test with replication = \{ 'class': 'SimpleStrategy', 'replication_factor': 1} and DURABLE_WRITES=true ; cassandra@cqlsh> use test; cassandra@cqlsh:test> create table lwt (a int primary key, b int); cassandra@cqlsh:test> update lwt set b = 1 where a = 1 and token(a) > 0 and token(a)< 0; cassandra@cqlsh:test> update lwt set b = 1 where a = 1 and token(a) > 0 and token(a)< 0 if b = 1; ServerError: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 {code} {code} java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:657) at java.util.ArrayList.get(ArrayList.java:433) at org.apache.cassandra.cql3.statements.ModificationStatement.makeCasRequest(ModificationStatement.java:506) at org.apache.cassandra.cql3.statements.ModificationStatement.executeWithCondition(ModificationStatement.java:482) at org.apache.cassandra.cql3.statements.ModificationStatement.execute(ModificationStatement.java:452) at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:216) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:247) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:233) at org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:108) at org.apache.cassandra.transport.Message$Request.execute(Message.java:246) at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:612) at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:455) at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:38) at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:353) 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.SEPWorker.run(SEPWorker.java:115) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:748) {code} was: sandra@cqlsh> create keyspace test with replication = \{ 'class': 'SimpleStrategy', 'replication_factor': 1} and DURABLE_WRITES=true ; cassandra@cqlsh> use test; cassandra@cqlsh:test> create table lwt (a int primary key, b int); cassandra@cqlsh:test> update lwt set b = 1 where a = 1 and token(a) > 0 and token(a)< 0; cassandra@cqlsh:test> update lwt set b = 1 where a = 1 and token(a) > 0 and token(a)< 0 if b = 1; ServerError: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 > Java internal exception on empty partition key range and conditions > ------------------------------------------------------------------- > > Key: CASSANDRA-15343 > URL: https://issues.apache.org/jira/browse/CASSANDRA-15343 > Project: Cassandra > Issue Type: Bug > Components: CQL/Semantics > Reporter: Konstantin > Priority: Normal > > {code} > sandra@cqlsh> create keyspace test with replication = \{ 'class': > 'SimpleStrategy', 'replication_factor': 1} and DURABLE_WRITES=true ; > cassandra@cqlsh> use test; > cassandra@cqlsh:test> create table lwt (a int primary key, b int); > cassandra@cqlsh:test> update lwt set b = 1 where a = 1 and token(a) > 0 and > token(a)< 0; > cassandra@cqlsh:test> update lwt set b = 1 where a = 1 and token(a) > 0 and > token(a)< 0 if b = 1; > ServerError: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 > {code} > {code} > java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 > at java.util.ArrayList.rangeCheck(ArrayList.java:657) > at java.util.ArrayList.get(ArrayList.java:433) > at > org.apache.cassandra.cql3.statements.ModificationStatement.makeCasRequest(ModificationStatement.java:506) > at > org.apache.cassandra.cql3.statements.ModificationStatement.executeWithCondition(ModificationStatement.java:482) > at > org.apache.cassandra.cql3.statements.ModificationStatement.execute(ModificationStatement.java:452) > at > org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:216) > at > org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:247) > at > org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:233) > at > org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:108) > at > org.apache.cassandra.transport.Message$Request.execute(Message.java:246) > at > org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:612) > at > org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:455) > at > io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) > at > io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) > at > io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:38) > at > io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:353) > 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.SEPWorker.run(SEPWorker.java:115) > at > io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) > at java.lang.Thread.run(Thread.java:748) > {code} -- 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