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

When loading an AbstractType that does not include an instance field, an unhelpful exception is raised making diagnosis difficult

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 0.7 beta 1
    • None
    • None
    • Normal

    Description

      0.7.0 changes the contract for creating AbstractTypes. A custom AbstractType defined against 0.6.x will be incompatible and the error messaging around why the comparator is invalid is obtuse and non-obvious. Specifically, when porting a valid AbstractType from 0.6.x to 0.7 that does not include a public static instance field, the thrift system_add_column_family call will throw an exception whose only message is:

      InvalidRequestException(why:instance)

      No log messages are generated from the server as to the issue so the root cause is non obvious to developers.

      I marked as Major because types defined against 0.6.x did not require an "instance" field so at a minimum migration of AbstractTypes to 0.7 should document the change in what is expected of AbstractTypes.

      Patch attached for better logging and to create a more helpful exception for better communication to the client as to the issue.

      Attachments

        1. CASSANDRA-1242.patch
          1 kB
          Erik Onnen

        Activity

          People

            eonnen Erik Onnen
            eonnen Erik Onnen
            Erik Onnen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: