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

NPE on system_update_cf when adding an index to a column without existing metadata

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 0.7.0 rc 2
    • None
    • None
    • Cassandra 0.7 branch

    • Normal

    Description

      When trying to create a secondary index using system_update_column_family(), if you try to add an index on a column that does not already have an existing entry in the CfDef's column_metadata, a NullPointerException is thrown.

      Looks like the logic in o.a.c.config.CFMetaData.apply() is faulty. Specifically, creating a toUpdate Set (similar to the toAdd and toDelete) sets and using that for the loop ~ line 663 would fix this.

      Attachments

        1. 1764-test-v2.txt
          3 kB
          Tom Hobbs
        2. 1764-test.txt
          1 kB
          Tom Hobbs

        Activity

          People

            gdusbabek Gary Dusbabek
            thobbs Tom Hobbs
            Gary Dusbabek
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: