Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6551E18C5B for ; Tue, 1 Sep 2015 21:50:48 +0000 (UTC) Received: (qmail 54887 invoked by uid 500); 1 Sep 2015 21:50:47 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 54824 invoked by uid 500); 1 Sep 2015 21:50:47 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 54672 invoked by uid 99); 1 Sep 2015 21:50:47 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Sep 2015 21:50:47 +0000 Date: Tue, 1 Sep 2015 21:50:47 +0000 (UTC) From: "Michael Penick (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-10246) Names values don't work with batches MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-10246?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Penick updated CASSANDRA-10246: --------------------------------------- Description: This is broken at the protocol-level and in the implementation. At the protocol-level the {{}} component of the batch comes after the queries. That means the protocol parser would need to read ahead (and back track) to correctly read the values from the queries entries. Also, a batch-level setting for named values forces all queries to use named values. Should batches force homogenous query value types? (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 was: This is broken at the protocol-level and in the implementation. At the protocol-level the {{}} component of the batch comes after the queries. That means the protocol parser would need to read ahead (and back track) to correctly read the values from the queries entries. Also, a batch-level setting for named values forces all queries to use named values. Should batches force homogenous query value types? (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 > Names values don't work with batches > ------------------------------------ > > Key: CASSANDRA-10246 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10246 > Project: Cassandra > Issue Type: Bug > Components: API > Reporter: Michael Penick > > This is broken at the protocol-level and in the implementation. > At the protocol-level the {{}} component of the batch comes after the queries. That means the protocol parser would need to read ahead (and back track) to correctly read the values from the queries entries. Also, a batch-level setting for named values forces all queries to use named values. Should batches force homogenous query value types? (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 -- This message was sent by Atlassian JIRA (v6.3.4#6332)