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

Slice Queries Can Skip Intersecting SSTables

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: 2.0.7, 2.1 beta2
    • Component/s: None
    • Labels:
      None
    • Environment:

      quad core Windows7 x64, single node cluster
      Cassandra 2.0.5

    • Severity:
      Normal
    • Since Version:

      Description

      Investigating another problem, I needed to do COUNT on the several partitions of a table immediately after a test case ran, and I discovered that count on the full table and on each of the partitions returned different counts.

      In particular case, SELECT COUNT FROM sr LIMIT 1000000; returned the expected count from the test 99999 rows. The composite primary key splits the logical row into six distinct partitions, and when I issue a query asking for the total across all six partitions, the returned result is only 83999. Drilling down, I find that SELECT * from sr WHERE s = 5 AND l = 11 AND partition = 0; returns 30,000 rows, but a SELECT COUNT with the identical WHERE predicate reports only 14,000.

      This is failing immediately after running a single small test, such that there are only two SSTables, sr-jb-1 and sr-jb-2. Compaction never needed to run.

      In selectrowcounts.txt is a copy of the cqlsh output showing the incorrect count results.

        Attachments

        1. 6825-2.0-part2.txt
          3 kB
          Tom Hobbs
        2. 6825-2.0-v2.txt
          27 kB
          Tom Hobbs
        3. 6825-2.0.txt
          27 kB
          Tom Hobbs
        4. testdb_1395372407904.zip
          9.21 MB
          Bill Mitchell
        5. testdb_1395372407904.zip
          5.41 MB
          Bill Mitchell
        6. selectpartitions.zip
          2.68 MB
          Bill Mitchell
        7. cassandra.log
          74 kB
          Bill Mitchell
        8. selectrowcounts.txt
          0.6 kB
          Bill Mitchell

          Issue Links

            Activity

              People

              • Assignee:
                thobbs Tom Hobbs
                Reporter:
                wtmitchell3 Bill Mitchell
                Authors:
                Tom Hobbs
                Reviewers:
                Sylvain Lebresne
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: