Cassandra
  1. Cassandra
  2. CASSANDRA-1450

Memtable flush causes bad "reversed" get_slice

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Fix Version/s: 0.7 beta 2
    • Component/s: Core
    • Labels:
      None
    • Environment:

      Cassandra Trunk

      Description

      If columns are inserted into a row before and after a memtable flush, a get_slice() after the flush with reversed=True will return incorrect results. See attached patch to reproduce.

      1. 1450.txt
        5 kB
        Jonathan Ellis
      2. reversed_slice_reproduce.txt
        1 kB
        Tyler Hobbs

        Activity

        Tyler Hobbs created issue -
        Tyler Hobbs made changes -
        Field Original Value New Value
        Attachment reversed_slice_reproduce.txt [ 12453524 ]
        Brandon Williams made changes -
        Fix Version/s 0.7 beta 2 [ 12315251 ]
        Jonathan Ellis made changes -
        Assignee Jonathan Ellis [ jbellis ]
        Hide
        Jonathan Ellis added a comment -

        patch applies reversed flag during collation from different data sources and makes QF.getColumnComparator package-private to make it more difficult to make the same mistake again. unit test added to TableTest.

        Show
        Jonathan Ellis added a comment - patch applies reversed flag during collation from different data sources and makes QF.getColumnComparator package-private to make it more difficult to make the same mistake again. unit test added to TableTest.
        Jonathan Ellis made changes -
        Attachment 1450.txt [ 12453781 ]
        Hide
        Brandon Williams added a comment -

        +1, though maybe the flush in the test should be explicit since it's not immediately obvious it will occur after 20 ops.

        Show
        Brandon Williams added a comment - +1, though maybe the flush in the test should be explicit since it's not immediately obvious it will occur after 20 ops.
        Hide
        Jonathan Ellis added a comment -

        committed, w/ test adjusted as suggested

        Show
        Jonathan Ellis added a comment - committed, w/ test adjusted as suggested
        Jonathan Ellis made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Reviewer brandon.williams
        Resolution Fixed [ 1 ]
        Gavin made changes -
        Workflow no-reopen-closed, patch-avail [ 12519358 ] patch-available, re-open possible [ 12752419 ]
        Gavin made changes -
        Workflow patch-available, re-open possible [ 12752419 ] reopen-resolved, no closed status, patch-avail, testing [ 12755347 ]

          People

          • Assignee:
            Jonathan Ellis
            Reporter:
            Tyler Hobbs
            Reviewer:
            Brandon Williams
          • Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development