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

Updates to PerRowSecondaryIndex don't use most current values

    XMLWordPrintableJSON

Details

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

    Description

      The way that updates to secondary indexes are performed using SecondaryIndexManager.Updater is flawed for PerRowSecondaryIndexes. Unlike PerColumnSecondaryIndexes, which only require the old & new values for a single column, the expectation is that a PerRow indexer can be given just a key which it will use to retrieve the entire row (or as many columns as it requires) and perform its indexing on those columns. As the indexes are updated before the memtable atomic swap occurs, a per-row indexer may only read the previous values for the row, not the new ones that are being written. In the case of an insert, there is no previous value and so nothing is added to the index.

      Attachments

        1. 5397-1.2-v4.txt
          14 kB
          Sam Tunnicliffe
        2. 5397-1.2-v3.txt
          13 kB
          Jonathan Ellis
        3. 5397_trunk.txt
          13 kB
          Sam Tunnicliffe
        4. 5397_12.txt
          14 kB
          Sam Tunnicliffe
        5. 5397.txt
          14 kB
          Sam Tunnicliffe

        Activity

          People

            samt Sam Tunnicliffe
            samt Sam Tunnicliffe
            Sam Tunnicliffe
            Jonathan Ellis
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: