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

Tyler Hobbs commented on CASSANDRA-12142:
-----------------------------------------

In {{Frame.decode()}}, we need to keep the check for a protocol version that's 
too low in the original location.  The reason is that the header length is only 
8 bytes in v1/v2, and 9 bytes in v3.  So if the driver sends a v2 message with 
an 8 byte header (and no body), we will never have enough bytes to match 
{{Header.LENGTH}} (which is 9 bytes now).

When the protocol version is too low, we also need to use the {{version}} 
argument with the {{ProtocolException}} constructor to force it to respond with 
a v1/v2 header.  (I also realize that my patch for CASSANDRA-11464 should have 
included an assertion in that constuctor checking that 
{{attemptedLowProtocolVersion}} is lower than {{Server.MIN_SUPPORTED_VERSION}}, 
so it would be nice if you can add that in your patch.)

Similarly, the update to the native protocol docs is not exactly correct -- 
when the driver sends a message with a protocol version that's too low, we 
_will_ respond with an error message in that protocol version, not 
{{CURRENT_VERSION}}.  Other than that, I think the update to the protocol spec 
is a good idea.

With those changes, I think the patch should be good to go!

> Add "beta" version native protocol flag
> ---------------------------------------
>
>                 Key: CASSANDRA-12142
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12142
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: CQL
>            Reporter: Tyler Hobbs
>            Assignee: Alex Petrov
>              Labels: protocolv5
>
> As discussed in CASSANDRA-10786, we'd like to add a new flag to the native 
> protocol to allow drivers to connect using a "beta" native protocol version.  
> This would be used for native protocol versions that are still in development 
> and may not have all of the final features.  Without the "beta" flag, drivers 
> will be prevented from using the protocol version.
> This is primarily useful for driver authors to start work against a new 
> protocol version when the work on that spans multiple releases.  Users would 
> not generally be expected to utilize this flag, although it could potentially 
> be used to offer early feedback on new protocol features.
> It seems like the {{STARTUP}} message body is the best place for the new beta 
> flag.  We may also considering adding protocol information to the 
> {{SUPPORTED}} message as well.



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

Reply via email to