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

get_range_slice returns multiple copies of each row for ConsistencyLevel > ONE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 0.6
    • None
    • None
    • 4-cluster Gentoo Linux 2.6.18 with a ReplicationFactor of 2

    • Normal

    Description

      I've noticed that both 0.5.1 and 0.6b2 return multiple identical copies of the data stored in my keyspace whenever I make a call to get_range_slice or get_range_slices using
      ConsistencyLevel.QUORUM and ReplicationFactor is greater than one.

      So with ReplicationFactor set to 2 for my application's KeySpace I get double the number of KeySlices that I expect to get. When using ConsistencyLevel.ONE I get only one KeySlice for each row.

      I've seen this happen with Cassandra 0.5.1 and with 0.6 beta 2. The behavior on 0.6 beta 2 is exhibited with both get_range_slice and get_range_slices.

      The attached Java program demonstrates the issue for 0.6 beta 2. The program writes a series of single-column rows into the Standard1 table, and then uses get_range_slice to receive a list of all row. The returned number of rows is consistently twice the number of rows written to the database. I wipe out the database completely before running the test.

      Attachments

        1. TestApp2.java
          3 kB
          Omer van der Horst Jansen
        2. 0001-RangeSliceResponseResolver.patch
          0.8 kB
          Omer van der Horst Jansen
        3. 884-v2.txt
          1 kB
          Jonathan Ellis

        Activity

          People

            omerhj Omer van der Horst Jansen
            omerhj Omer van der Horst Jansen
            Omer van der Horst Jansen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: