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

Paging on DISTINCT queries repeats result when first row in partition changes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 2.2.6
    • None
    • None
    • Low

    Description

      When paging, we always check new pages to see if they start with the same row that the previous page ended with, and if so, we trim that row to avoid duplicates. With DISTINCT queries, we only fetch the first row in each partition. If that row happens to change (it's deleted, or another row is inserted at the front of the partition) in between fetching the two pages, our check for a matching row will fail, resulting in a duplicate row being returned.

      It seems like the correct fix is to handle DISTINCT queries specially and only check to see if the partition key matches the last returned one instead checking that the rows match.

      Attachments

        1. 10010-2.2.txt
          2 kB
          Benjamin Lerer

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: