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

Ambiguous error message: "You must specify one and only one PRIMARY KEY"

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 2.0.1
    • None
    • None

    Description

      Minor issue, but might be beneficial for new people. I was missing a primary key but thought it meant there was more than one primary key, and was confused for a minute. Here is the current error:

      Caused by: com.datastax.driver.core.exceptions.InvalidQueryException: You must specify one and only one PRIMARY KEY
      at com.datastax.driver.core.ResultSetFuture.convertException(ResultSetFuture.java:252)
      at com.datastax.driver.core.ResultSetFuture$ResponseCallback.onSet(ResultSetFuture.java:119)
      at com.datastax.driver.core.RequestHandler.setFinalResult(RequestHandler.java:202)
      at com.datastax.driver.core.RequestHandler.onSet(RequestHandler.java:319)

      Recommend considering two different error messages, ie:

      • No primary keys were found, when exactly one is required.
      • Multiple primary keys were found, when exactly one may be specified.

      Attachments

        1. 5875.patch
          0.9 kB
          Lyuben Todorov

        Activity

          People

            lyubent Lyuben Todorov
            corydoras Jacob Rhoden
            Lyuben Todorov
            Jonathan Ellis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: