[jira] [Commented] (CASSANDRA-10246) Named values don't work with batches

2015-10-30 Thread Sylvain Lebresne (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-10246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14982158#comment-14982158
 ] 

Sylvain Lebresne commented on CASSANDRA-10246:
--

Yeah, I think the fix version on this is wrong. It's sad that named values 
don't work in the protocol v4 but that's the way it is. The only sensible 
solution now is to fix that in the protocol v5, which does mean we should make 
this a subtask of CASSANDRA-9362, but also that this won't make 3.1 (we don't 
have decide yet when we want to go ahead with protocol v5, but it'll probably 
not be before a few months).

I'll add a note to the protocol doc that named values in batch actually don't 
work and can't be used in the meantime.

> Named values don't work with batches
> 
>
> Key: CASSANDRA-10246
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10246
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
>Reporter: Michael Penick
>Assignee: Ariel Weisberg
>  Labels: client-impacting
> Fix For: 2.1.x, 2.2.x, 3.1
>
>
> 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 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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-10246) Named values don't work with batches

2015-10-29 Thread Ariel Weisberg (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-10246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14981142#comment-14981142
 ] 

Ariel Weisberg commented on CASSANDRA-10246:


It seems like existing clients will never be able to use named values in 
batches without updating the protocol. There is no way to correctly decode far 
enough to get to the flags to find out how to correctly decode the lists.

It seems like there is nothing we can do to save old clients and give them a 
good error.

What is the story with protocol changes like this? It seems like we need a 
version bump otherwise newer versions of the client library can't identify that 
the server is unable to correctly handle the suggestion in CASSANDRA-10247.

Speaking of clients this also means we need to update all the client libraries 
to refuse to used named values in batches when the server is a version that 
doesn't support CASSANDRA-10247 as well as to encode using that approach (or 
some other).

> Named values don't work with batches
> 
>
> Key: CASSANDRA-10246
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10246
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
>Reporter: Michael Penick
>Assignee: Ariel Weisberg
>  Labels: client-impacting
> Fix For: 2.1.x, 2.2.x, 3.1
>
>
> 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 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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-10246) Named values don't work with batches

2015-10-29 Thread Ariel Weisberg (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-10246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14981337#comment-14981337
 ] 

Ariel Weisberg commented on CASSANDRA-10246:


[~slebresne] [~iamaleksey] [~JoshuaMcKenzie]
How are we going to handle a version bump to the client protocol in tick-tock? 
Is the plan that 3.1 will bump the number and the server will start handling 
batches with named values correctly?

> Named values don't work with batches
> 
>
> Key: CASSANDRA-10246
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10246
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
>Reporter: Michael Penick
>Assignee: Ariel Weisberg
>  Labels: client-impacting
> Fix For: 2.1.x, 2.2.x, 3.1
>
>
> 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 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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-10246) Named values don't work with batches

2015-10-29 Thread Aleksey Yeschenko (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-10246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14981360#comment-14981360
 ] 

Aleksey Yeschenko commented on CASSANDRA-10246:
---

[~aweisberg] We create a new version (next one will be 5, CASSANDRA-9362), and 
fix it there. Clients that requested for v5 native protocol on connect will use 
it, and for them the issue will be fixed. Clients connecting using older 
versions (4 and down) will not have the fix.

> Named values don't work with batches
> 
>
> Key: CASSANDRA-10246
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10246
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
>Reporter: Michael Penick
>Assignee: Ariel Weisberg
>  Labels: client-impacting
> Fix For: 2.1.x, 2.2.x, 3.1
>
>
> 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 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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-10246) Named values don't work with batches

2015-10-29 Thread Ariel Weisberg (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-10246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14981648#comment-14981648
 ] 

Ariel Weisberg commented on CASSANDRA-10246:


[~iamaleksey] I don't understand the fix versions for this issue. It's "not a 
bug" in previous versions it simply doesn't work and the Java client library at 
least doesn't use named values at all. Native protocol v5 has a fix version of 
3.x not 2.1.x or 2.2.x so is the fix version here incorrect?

Should this or CASSANDRA-10247 be linked/subtasked to CASSANDRA-9362?

> Named values don't work with batches
> 
>
> Key: CASSANDRA-10246
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10246
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
>Reporter: Michael Penick
>Assignee: Ariel Weisberg
>  Labels: client-impacting
> Fix For: 2.1.x, 2.2.x, 3.1
>
>
> 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 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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-10246) Named values don't work with batches

2015-09-21 Thread Michael Penick (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-10246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14901477#comment-14901477
 ] 

Michael Penick commented on CASSANDRA-10246:


[~mambocab] It affects protocol version 3 and higher. Yes, it also affects C* 
3.0+.

> Named 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
>  Labels: client-impacting
>
> 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 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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-10246) Named values don't work with batches

2015-09-15 Thread Jim Witschey (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-10246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14746050#comment-14746050
 ] 

Jim Witschey commented on CASSANDRA-10246:
--

Just to clarify: does the protocol bug affect all versions of the protocol? and 
does the implementation bug also affect C* versions 3.0 and higher?

> Named 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
>  Labels: client-impacting
>
> 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 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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)