Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-18478 Native Protocol Improvements
  3. CASSANDRA-10246

Fix named values in batches for native protocol

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Normal
    • Resolution: Unresolved
    • 5.x
    • Legacy/CQL
    • None
    • Clients

    Description

      This is broken at the protocol-level and in the implementation.

      At the protocol-level the <flags> component of the batch comes after the queries. That means the protocol parser would need to read ahead (and back track) to determine the values encoding and correctly read the values from the query entries. Also, a batch-level setting for named values forces all queries to use the same encoding. Should batches force a single, homogenous query value encoding? (This is confusing)

      In the implementation, values are indiscriminately read using CBUtil.readValueList(), and the batch flags are never checked (for (Flag.NAMES_FOR_VALUES) to see if CBUtil.readNameAndValueList() should be called instead: https://github.com/apache/cassandra/blob/cassandra-2.1/src/java/org/apache/cassandra/transport/messages/BatchMessage.java#L64

      Proposed solution: CASSANDRA-10247

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mpenick Michael Penick
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated: