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

Jens Rantil commented on CASSANDRA-8128:
----------------------------------------

> Can you paste the schema for the keyspace and table to help with 
> reproduction? Obfuscating the names of the keyspace, table, and columns is 
> fine.

Sure,

{noformat}
cqlsh:mykeyspace> DESCRIBE TABLE mytable;

CREATE TABLE mytable (
  col1 uuid,
  col2 uuid,
  col3 uuid,
  col4 double,
  col5 uuid,
  col6 text,
  col7 uuid,
  col8 timestamp,
  col9 text,
  col10 text,
  col11 bigint,
  col12 timestamp,
  col13 double,
  col14 text,
  col15 text,
  col16 text,
  col17 double,
  col18 double,
  col19 uuid,
  col20 text,
  col21 double,
  col22 timestamp,
  col23 text,
  col24 text,
  col25 boolean,
  "col62" bigint,
  col27 text,
  col28 boolean,
  col29 boolean,
  col30 boolean,
  col31 boolean,
  col32 boolean,
  PRIMARY KEY ((col1), col2)
) WITH
  bloom_filter_fp_chance=0.100000 AND
  caching='KEYS_ONLY' AND
  comment='' AND
  dclocal_read_repair_chance=0.100000 AND
  gc_grace_seconds=864000 AND
  index_interval=128 AND
  read_repair_chance=0.000000 AND
  replicate_on_write='true' AND
  populate_io_cache_on_flush='false' AND
  default_time_to_live=0 AND
  speculative_retry='99.0PERCENTILE' AND
  memtable_flush_period_in_ms=0 AND
  compaction={'class': 'LeveledCompactionStrategy'} AND
  compression={'sstable_compression': 'LZ4Compressor'};
{noformat}

> What do you mean by UPSERT? We have no such keyword in CQL. Do you mean 
> INSERT? or UPDATE? or INSERT ... IF NOT EXISTS? How many rows in the batch? 
> How are you building it?

Sorry, there's no logical difference between INSERT and UPDATE (right?), but I 
should obviously be more clear. I am using spring-data-cassandra to store list 
of objects. spring-data-cassandra uses Datastax Java Driver and generates the 
CQL itself. The exception I am getting on the client end can be found here: 
https://jira.spring.io/browse/DATACASS-161. Based on it, I am doing an INSERT 
(the rows don't exist previously in the database). Usually Batches around 
1000-3000 rows. Like I said, smaller batches work.

> Exception when executing UPSERT
> -------------------------------
>
>                 Key: CASSANDRA-8128
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8128
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API
>            Reporter: Jens Rantil
>            Priority: Critical
>              Labels: cql3
>
> I am putting a bunch of (CQL) rows into Datastax DSE 4.5.1-1. Each upsert is 
> for a single partition key with up to ~3000 clustering keys. I understand to 
> large upsert aren't recommended, but I wouldn't expect to be getting the 
> following exception anyway:
> {noformat}
> ERROR [Native-Transport-Requests:4205136] 2014-10-16 12:00:38,668 
> ErrorMessage.java (line 222) Unexpected exception during request
> java.lang.IndexOutOfBoundsException: Index: 1749, Size: 1749
>         at java.util.ArrayList.rangeCheck(ArrayList.java:635)
>         at java.util.ArrayList.get(ArrayList.java:411)
>         at 
> org.apache.cassandra.cql3.Constants$Marker.bindAndGet(Constants.java:278)
>         at 
> org.apache.cassandra.cql3.Constants$Setter.execute(Constants.java:307)
>         at 
> org.apache.cassandra.cql3.statements.UpdateStatement.addUpdateForKey(UpdateStatement.java:99)
>         at 
> org.apache.cassandra.cql3.statements.BatchStatement.addStatementMutations(BatchStatement.java:200)
>         at 
> org.apache.cassandra.cql3.statements.BatchStatement.getMutations(BatchStatement.java:145)
>         at 
> org.apache.cassandra.cql3.statements.BatchStatement.execute(BatchStatement.java:251)
>         at 
> org.apache.cassandra.cql3.statements.BatchStatement.execute(BatchStatement.java:232)
>         at 
> org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:158)
>         at 
> com.datastax.bdp.cassandra.cql3.DseQueryHandler.statementExecution(DseQueryHandler.java:207)
>         at 
> com.datastax.bdp.cassandra.cql3.DseQueryHandler.process(DseQueryHandler.java:86)
>         at 
> org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:119)
>         at 
> org.apache.cassandra.transport.Message$Dispatcher.messageReceived(Message.java:304)
>         at 
> org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
>         at 
> org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
>         at 
> org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
>         at 
> org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43)
>         at 
> org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67)
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:745)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to