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

C* throws AssertionError when using paging and reverse ordering

    XMLWordPrintableJSON

    Details

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

      Last time issue has been reproduced with C* version is 2.0.0, DataStax CQL driver version 2.0.0-beta1 on a single node.

    • Severity:
      Normal
    • Since Version:

      Description

      We have a table with CLUSTERING ORDER BY (date DESC). We try to do a query C* with paging and ORDER BY date ASC.
      This leads to the following exception in C* when pager goes to the last page:

      ERROR [Native-Transport-Requests:1287744] 2013-10-30 01:53:14,720 ErrorMessage.java (line 210) Unexpected exception during request
      java.lang.AssertionError: Added column does not sort as the first column
      at org.apache.cassandra.db.ArrayBackedSortedColumns.addColumn(ArrayBackedSortedColumns.java:115)
      at org.apache.cassandra.db.ColumnFamily.addColumn(ColumnFamily.java:116)
      at org.apache.cassandra.service.pager.AbstractQueryPager.discardLast(AbstractQueryPager.java:238)
      at org.apache.cassandra.service.pager.AbstractQueryPager.discardLast(AbstractQueryPager.java:182)
      at org.apache.cassandra.service.pager.AbstractQueryPager.fetchPage(AbstractQueryPager.java:100)
      at org.apache.cassandra.service.pager.SliceQueryPager.fetchPage(SliceQueryPager.java:33)
      at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:179)
      at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:56)
      at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:101)
      at org.apache.cassandra.cql3.QueryProcessor.processPrepared(QueryProcessor.java:235)
      at org.apache.cassandra.transport.messages.ExecuteMessage.execute(ExecuteMessage.java:139)
      at org.apache.cassandra.transport.Message$Dispatcher.messageReceived(Message.java:296)
      at org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:45)
      at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:69)
      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:724)

        Attachments

        1. 6343.txt
          11 kB
          Sylvain Lebresne

          Activity

            People

            • Assignee:
              slebresne Sylvain Lebresne
              Reporter:
              ach Alexey Chumakov
              Authors:
              Sylvain Lebresne
              Reviewers:
              Aleksey Yeschenko
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: