Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-11621

Stack Overflow inserting value with many columns

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: 2.2.7
    • Component/s: None
    • Labels:
      None
    • Environment:

      CQL 3
      C* 2.2.5

    • Severity:
      Normal

      Description

      I am using CQL to insert into a table that has ~4000 columns

        TABLE_DEFINITION = "
            id uuid,
            "dimension_n" for n in _.range(N_DIMENSIONS)
            ETAG timeuuid,
            PRIMARY KEY (id)
          "
      

      I am using the node.js library from Datastax to execute CQL. This creates a prepared statement and then uses it to perform an insert. It works fine on C* 2.1 but after upgrading to C* 2.2.5 I get the stack overflow below.

      I know enough Java to think that recursing an iterator is bad form and should be easy to fix.

      ERROR 14:59:01 Unexpected exception during request; channel = [id: 0xaac42a5d, /10.0.7.182:58736 => /10.0.0.87:9042]
      java.lang.StackOverflowError: null
      	at com.google.common.base.Preconditions.checkPositionIndex(Preconditions.java:339) ~[guava-16.0.jar:na]
      	at com.google.common.collect.AbstractIndexedListIterator.<init>(AbstractIndexedListIterator.java:69) ~[guava-16.0.jar:na]
      	at com.google.common.collect.Iterators$11.<init>(Iterators.java:1048) ~[guava-16.0.jar:na]
      	at com.google.common.collect.Iterators.forArray(Iterators.java:1048) ~[guava-16.0.jar:na]
      	at com.google.common.collect.RegularImmutableList.listIterator(RegularImmutableList.java:106) ~[guava-16.0.jar:na]
      	at com.google.common.collect.ImmutableList.listIterator(ImmutableList.java:344) ~[guava-16.0.jar:na]
      	at com.google.common.collect.ImmutableList.iterator(ImmutableList.java:340) ~[guava-16.0.jar:na]
      	at com.google.common.collect.ImmutableList.iterator(ImmutableList.java:61) ~[guava-16.0.jar:na]
      	at com.google.common.collect.Iterables.iterators(Iterables.java:504) ~[guava-16.0.jar:na]
      	at com.google.common.collect.Iterables.access$100(Iterables.java:60) ~[guava-16.0.jar:na]
      	at com.google.common.collect.Iterables$2.iterator(Iterables.java:494) ~[guava-16.0.jar:na]
      	at com.google.common.collect.Iterables$3.transform(Iterables.java:508) ~[guava-16.0.jar:na]
      	at com.google.common.collect.Iterables$3.transform(Iterables.java:505) ~[guava-16.0.jar:na]
      	at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48) ~[guava-16.0.jar:na]
      	at com.google.common.collect.Iterators$5.hasNext(Iterators.java:543) ~[guava-16.0.jar:na]
      	at com.google.common.collect.Iterators$5.hasNext(Iterators.java:542) ~[guava-16.0.jar:na]
      	at com.google.common.collect.Iterators$5.hasNext(Iterators.java:542) ~[guava-16.0.jar:na]
      	at com.google.common.collect.Iterators$5.hasNext(Iterators.java:542) ~[guava-16.0.jar:na]
      	at com.google.common.collect.Iterators$5.hasNext(Iterators.java:542) ~[guava-16.0.jar:na]
      	at com.google.common.collect.Iterators$5.hasNext(Iterators.java:542) ~[guava-16.0.jar:na]
      ...
              at com.google.common.collect.Iterators$5.hasNext(Iterators.java:542) ~[guava-16.0.jar:na]
              at com.google.common.collect.Iterators$5.hasNext(Iterators.java:542) ~[guava-16.0.jar:na]
              at com.google.common.collect.Iterators$5.hasNext(Iterators.java:542) ~[guava-16.0.jar:na]
              at org.apache.cassandra.cql3.statements.ModificationStatement.checkAccess(ModificationStatement.java:168) ~[main/:na]
              at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:223) ~[main/:na]
              at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:257) ~[main/:na]
              at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:242) ~[main/:na]
              at org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:123) ~[main/:na]
              at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:507) [main/:na]
              at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:401) [main/:na]
              at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) [netty-all-4.0.23.Final.jar:4.0.23.Final]
              at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [netty-all-4.0.23.Final.jar:4.0.23.Final]
              at io.netty.channel.AbstractChannelHandlerContext.access$700(AbstractChannelHandlerContext.java:32) [netty-all-4.0.23.Final.jar:4.0.23.Final]
              at io.netty.channel.AbstractChannelHandlerContext$8.run(AbstractChannelHandlerContext.java:324) [netty-all-4.0.23.Final.jar:4.0.23.Final]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_77]
              at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:164) [main/:na]
              at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:105) [main/:na]
              at java.lang.Thread.run(Thread.java:745) [na:1.8.0_77]
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ifesdjeen Alex Petrov
                Reporter:
                eastlondoner Andrew Jefferson
                Authors:
                Alex Petrov
                Reviewers:
                Sam Tunnicliffe
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: