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

No error if consistency_level = SERIAL and unqualified select

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Invalid
    • Fix Version/s: 4.0, 4.0-alpha4
    • Component/s: CQL/Semantics
    • Labels:
      None
    • Bug Category:
      Correctness - Consistency
    • Severity:
      Normal
    • Complexity:
      Low Hanging Fruit
    • Discovered By:
      User Report
    • Platform:
      All
    • Impacts:
      None

      Description

      The attached test program produces no errors, while doesn't provide serial consistency. There is no exception that the consistency level is incorrect. It's simply silently downgraded. The issue is not documented either.

      kostja@atlas ~ % python test.py
      Row(a=1, b=1)
      Row(a=0, b=0)
      Row(a=2, b=2)
      Row(a=3, b=3)
      Row(a=1, b=1)
      Row(a=2, b=2)

      The behavior is contrary to the original intent by LWT author, since the code has the following check:

      if (group.queries.size() > 1)
      throw new InvalidRequestException("SERIAL/LOCAL_SERIAL consistency may only be requested for one partition at a time");
      https://github.com/apache/cassandra/blob/cassandra-3.11/src/java/org/apache/cassandra/service/StorageProxy.java#L1593

        Attachments

          Activity

            People

            • Assignee:
              maxtomassi Massimiliano Tomassi Assign to me
              Reporter:
              Osipov Konstantin
              Authors:
              Massimiliano Tomassi

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment