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

CfDef can default to an invalid id and fail during system_add_column_family

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Urgent
    • Resolution: Fixed
    • 1.0.0
    • Legacy/CQL
    • None
    • Critical

    Description

      The line from this commit:
      https://github.com/apache/cassandra/commit/38e3e85b121ba6308ba3ceb26312d12ed0d609ec#L1R683

      Introduced an issue in that some clients, particularly Hector, will send a CfDef with an ID having been set to 0. Done via the CfDef#setId, the isSetId bit is flipped to true, causing error if schemaId of 0 already exists, which given the use case, is likely.

      Since we know the context of a system_create_column_family, this can be sidestepped by just stepping on whatever ID is there (irrelevant on a create anyway) with the value returned from: Schema.instance.nextCFId()

      Attachments

        1. 3822v2.txt
          1 kB
          Nate McCall
        2. 3288.txt
          0.6 kB
          Jonathan Ellis

        Activity

          People

            jbellis Jonathan Ellis
            zznate Nate McCall
            Jonathan Ellis
            Nate McCall
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: