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

Benedict commented on CASSANDRA-15066:
--------------------------------------

h2. Handshake

During audit of the code it became apparent that our legacy handshake protocol 
had a number of issues:
* Requires three messages, and multiple connection attempts in mixed version 
clusters
* Differed unnecessarily between streaming and messaging
* Messages could be corrupted, leading to unknown connection state

We have attempted to address these issues with a new handshake protocol for 
post40 nodes, that sends only two messages: Initiate and Accept
* Initiate, contains
** Compression, CRC and Streaming flags
** Messaging versions the initiating node will accept
** The broadcast address of the initiating node
* Accept, contains
** The messaging version to use, if any overlap is possible (or the nearest 
acceptable version otherwise)
** The receiving node’s current messaging version

Both messages contain a CRC trailer for verifying their contents.  Streaming 
and Messaging both use the same protocol, just with different messaging 
versions in the Initiate message (for streaming, only {{current_version}} is 
accepted).  This change makes it very easy to support mixed-version streaming 
from old to new nodes.

Note: this patch has removed streaming versioning, since it was not seemingly 
useful.


> Improvements to Internode Messaging
> -----------------------------------
>
>                 Key: CASSANDRA-15066
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15066
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Messaging/Internode
>            Reporter: Benedict
>            Assignee: Benedict
>            Priority: Normal
>             Fix For: 4.0
>
>
> CASSANDRA-8457 introduced asynchronous networking to internode messaging, but 
> there have been several follow-up endeavours to improve some semantic issues. 
>  CASSANDRA-14503 and CASSANDRA-13630 are the latest such efforts, and were 
> combined some months ago into a single overarching refactor of the original 
> work, to address some of the issues that have been discovered.  Given the 
> criticality of this work to the project, we wanted to bring some more eyes to 
> bear to ensure the release goes ahead smoothly.  In doing so, we uncovered a 
> number of issues with messaging, some of which long standing, that we felt 
> needed to be addressed.  This patch widens the scope of CASSANDRA-14503 and 
> CASSANDRA-13630 in an effort to close the book on the messaging service, at 
> least for the foreseeable future.
> The patch includes a number of clarifying refactors that touch outside of the 
> {{net.async}} package, and a number of semantic changes to the {{net.async}} 
> packages itself.  We believe it clarifies the intent and behaviour of the 
> code while improving system stability, which we will outline in comments 
> below.
> https://github.com/belliottsmith/cassandra/tree/messaging-improvements



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to