You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Aleksey Yeschenko (JIRA)" <ji...@apache.org> on 2015/05/14 21:05:03 UTC

[jira] [Commented] (CASSANDRA-9219) Follow-ups to 7523: protect old clients from new type values and reject empty ByteBuffer

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

Aleksey Yeschenko commented on CASSANDRA-9219:
----------------------------------------------

LGTM. Nits diff attached.

I'd also roll back the changes to {{SimpleDateTypeTest}} and {{TypeParser}}. It's a bit git-unfriendly, since no code there is modified by the patch.

Would also be nice to assert the correct size returned by {{DataType.serializedValueSize()}} in {{DateTypeTest.testEncodeDecode()}}.

> Follow-ups to 7523: protect old clients from new type values and reject empty ByteBuffer
> ----------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-9219
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9219
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Joshua McKenzie
>            Assignee: Joshua McKenzie
>            Priority: Minor
>              Labels: client-impacting
>             Fix For: 2.2 beta 1
>
>         Attachments: 9219-nits.txt
>
>
> 2 follow-ups from CASSANDRA-7523, which has now been removed from the 2.1 branch:
> bq. The problem is that if someone use one of those new data types with an existing client, Cassandra will currently happily return the new codes, which clients have no reason to know about and may therefore crash in unexpected ways. That is a problem and that's what I meant by "Adding new codes to v3 would confuse drivers".
> bq. So what I mean is that we should special case those 2 types in DataType (maybe in toType, maybe directly in the serialization) so that when the protocol version is <= 3, then it write the types as CUSTOM ones. 
> And
> bq. can we make the new types non-emptiable by default? See the last two CASSANDRA-8951 comments.
> bq. Would really like us to reject empty BB as a valid value there though



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