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

Vijay commented on CASSANDRA-4139:
----------------------------------

Trunk: we start with the latest version (OTCPC) and the lower versions in ITCPC 
(will start ignoring messages). Once we detect the right version we change the 
version of the message sent.

OutputTCPConnection
{code}
    public void write(MessageOut<?> message, String id, DataOutputStream out) 
throws IOException
    {
        write(message, id, out, 
Gossiper.instance.getVersion(poolReference.endPoint()));
    }
{code}

IncomingTcpConnection
{code}
                MessagingService.validateMagic(input.readInt());
                header = input.readInt();
                assert isStream == (MessagingService.getBits(header, 3, 1) == 
1) : "Connections cannot change type: " + isStream;
                version = MessagingService.getBits(header, 15, 8);
                logger.trace("Version is now {}", version);
                receiveMessage(input, version);
{code}
                
> Add varint encoding to Messaging service
> ----------------------------------------
>
>                 Key: CASSANDRA-4139
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4139
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Core
>            Reporter: Vijay
>            Assignee: Vijay
>             Fix For: 1.2
>
>         Attachments: 0001-CASSANDRA-4139-v1.patch, 
> 0001-CASSANDRA-4139-v2.patch, 0001-CASSANDRA-4139-v3.patch, 
> 0002-add-bytes-written-metric.patch, 4139-Test.rtf
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to