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

Bad paging state returned for prepared statements for last page

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 2.1 rc1
    • Legacy/CQL
    • None
    • Normal

    Description

      When executing a paged query with a prepared statement, a non-null paging state is sometimes being returned for the final page, causing an endless paging loop.

      Specifically, this is the schema being used:

          CREATE KEYSPACE test3rf WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'}';
          USE test3rf;
          CREATE TABLE test3rf.test (
                      k int PRIMARY KEY,
                      v int
          )
      

      The inserts are like so:

      INSERT INTO test3rf.test (k, v) VALUES (?, 0)
      

      With values from [0, 99] used for k.

      The query is SELECT * FROM test3rf.test with a fetch size of 3.

      The final page returns the row with k=3, and the paging state is 0004000000420004000176007fffffa2. This matches the paging state from three pages earlier. When executing this with a non-prepared statement, no paging state is returned for this page.

      This problem doesn't happen with the 2.0 branch.

      Attachments

        1. 7120-alternative.txt
          8 kB
          Sylvain Lebresne
        2. 7120.txt
          3 kB
          Tom Hobbs

        Issue Links

          Activity

            People

              slebresne Sylvain Lebresne
              thobbs Tom Hobbs
              Sylvain Lebresne
              Tom Hobbs
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: