[ 
https://issues.apache.org/jira/browse/CASSANDRA-11464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tyler Hobbs updated CASSANDRA-11464:
------------------------------------
         Reviewer: Sandeep Tamhankar
    Fix Version/s: 3.x
                   3.0.x

The problem is that the v1/v2 protocol header is only 8 bytes, while the v3+ 
protocol header is 9 bytes.  When decoding a frame, we first wait for a 
complete header's worth of bytes.  When the actually header is only 8 bytes 
(instead of the expected 9), we never get enough bytes to trigger the protocol 
version check. I've adjusted this to check the protocol version as soon as we 
have the first byte.

It turns out that a dtest would be a little tricky to write due to the python 
driver now having automatic protocol version downgrading.  So, instead, I've 
added a new unit test that uses the shorter v1 protocol header.

Patch and pending CI test runs:

||branch||testall||dtest||
|[CASSANDRA-11464|https://github.com/thobbs/cassandra/tree/CASSANDRA-11464]|[testall|http://cassci.datastax.com/view/Dev/view/thobbs/job/thobbs-CASSANDRA-11464-testall]|[dtest|http://cassci.datastax.com/view/Dev/view/thobbs/job/thobbs-CASSANDRA-11464-dtest]|
|[CASSANDRA-11464-trunk|https://github.com/thobbs/cassandra/tree/CASSANDRA-11464-trunk]|[testall|http://cassci.datastax.com/view/Dev/view/thobbs/job/thobbs-CASSANDRA-11464-trunk-testall]|[dtest|http://cassci.datastax.com/view/Dev/view/thobbs/job/thobbs-CASSANDRA-11464-trunk-dtest]|

[~stamhankar999] would you mind reviewing?

> C* doesn't respond to OPTIONS request containing low protocol number
> --------------------------------------------------------------------
>
>                 Key: CASSANDRA-11464
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11464
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Sandeep Tamhankar
>            Assignee: Tyler Hobbs
>             Fix For: 3.0.x, 3.x
>
>
> Observed in Ruby and Python drivers: if you send an OPTIONS message to C* 3.4 
> (though I believe this goes back to 3.0) with a protocol version of 1, C* 
> doesn't send a response to the client. If you specify a high protocol version 
> (e.g. 5), C* does correctly respond with a protocol error.



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

Reply via email to