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

Mutated ColumnFamily is not available to per-row indexes during update

Agile BoardAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 2.1 rc6
    • None
    • None

    Description

      PerRowSecondaryIndex implementations are updated when SecondaryIndexManager.Updater.updateRowLevelIndexes is called from AtomicBTreeColumns.addAllWithSizeDelta. The StandardUpdater implementation does this by passing the key and cf from the incoming Mutation to the PRSI.index() method. However, the StandardUpdater instance created in Keyspace.apply() does not wrap the Mutation's cf as it is obtained using the wrong factory method. This results in the cf passed to the PRSI always being null.

      This isn't caught by PerRowSecondaryIndexTest because the stub index implementation there only verifies that the latest version of the cf can be obtained by the index reading from the base cf.

      Attaching a trivial patch to obtain an Updater which does wrap the mutated cf and also fix the test so it verifies both of the actual arguments passed to PRSI.index

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            samt Sam Tunnicliffe Assign to me
            samt Sam Tunnicliffe
            Sam Tunnicliffe
            Aleksey Yeschenko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment