You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Gary Dusbabek (JIRA)" <ji...@apache.org> on 2011/01/11 23:15:46 UTC

[jira] Created: (CASSANDRA-1970) Message version resolution

Message version resolution
--------------------------

                 Key: CASSANDRA-1970
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1970
             Project: Cassandra
          Issue Type: Sub-task
            Reporter: Gary Dusbabek
            Assignee: Gary Dusbabek
            Priority: Minor
             Fix For: 0.8


When a new new node (version N) contacts an old node (version N-1) for the first time, the old node will not understand the message.  One resolution mechanism would be for the old node to "bounce" the message back to the sender.  The sender would then respond by translating the message to the appropriate version and resending it.

For this to work, 0.7.1 will need to have the "bounce" feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1970) Message version resolution

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980519#action_12980519 ] 

Gary Dusbabek commented on CASSANDRA-1970:
------------------------------------------

bq. What if we added anyone we get a message from to the gossip ring (initially as a tokenless member)? That would let us "bootstrap" the gossip on the existing nodes' side.
I could see that.

> Message version resolution
> --------------------------
>
>                 Key: CASSANDRA-1970
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1970
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Gary Dusbabek
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>
> When a new new node (version N) contacts an old node (version N-1) for the first time, the old node will not understand the message.  One resolution mechanism would be for the old node to "bounce" the message back to the sender.  The sender would then respond by translating the message to the appropriate version and resending it.
> For this to work, 0.7.1 will need to have the "bounce" feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1970) Message version resolution

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-1970:
-------------------------------------

    Attachment:     (was: v2-0001-ignore-messages-from-newer-versions-keep-track-of-node.txt)

> Message version resolution
> --------------------------
>
>                 Key: CASSANDRA-1970
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1970
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Gary Dusbabek
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.7.2
>
>         Attachments: 1970.txt, v3-0001-ignore-messages-from-newer-versions-keep-track-of-node.txt
>
>
> When a new new node (version N) contacts an old node (version N-1) for the first time, the old node will not understand the message.  One resolution mechanism would be for the old node to "bounce" the message back to the sender.  The sender would then respond by translating the message to the appropriate version and resending it.
> For this to work, 0.7.1 will need to have the "bounce" feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1970) Message version resolution

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-1970:
-------------------------------------

    Attachment: v1-0001-bounce-messages-from-newer-versions.txt

> Message version resolution
> --------------------------
>
>                 Key: CASSANDRA-1970
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1970
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Gary Dusbabek
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.7.1
>
>         Attachments: 1970.txt, v1-0001-bounce-messages-from-newer-versions.txt
>
>
> When a new new node (version N) contacts an old node (version N-1) for the first time, the old node will not understand the message.  One resolution mechanism would be for the old node to "bounce" the message back to the sender.  The sender would then respond by translating the message to the appropriate version and resending it.
> For this to work, 0.7.1 will need to have the "bounce" feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1970) Message version resolution

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12986054#action_12986054 ] 

Gary Dusbabek commented on CASSANDRA-1970:
------------------------------------------

v2 uses inferring approach. 

> Message version resolution
> --------------------------
>
>                 Key: CASSANDRA-1970
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1970
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Gary Dusbabek
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.7.1
>
>         Attachments: 1970.txt, v1-0001-bounce-messages-from-newer-versions.txt, v2-0001-ignore-messages-from-newer-versions-keep-track-of-node.txt
>
>
> When a new new node (version N) contacts an old node (version N-1) for the first time, the old node will not understand the message.  One resolution mechanism would be for the old node to "bounce" the message back to the sender.  The sender would then respond by translating the message to the appropriate version and resending it.
> For this to work, 0.7.1 will need to have the "bounce" feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1970) Message version resolution

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12985947#action_12985947 ] 

Gary Dusbabek commented on CASSANDRA-1970:
------------------------------------------

I like the bouncing approach because it is simple and less invasive than modifying gossip.

> Message version resolution
> --------------------------
>
>                 Key: CASSANDRA-1970
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1970
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Gary Dusbabek
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.7.1
>
>         Attachments: 1970.txt, v1-0001-bounce-messages-from-newer-versions.txt
>
>
> When a new new node (version N) contacts an old node (version N-1) for the first time, the old node will not understand the message.  One resolution mechanism would be for the old node to "bounce" the message back to the sender.  The sender would then respond by translating the message to the appropriate version and resending it.
> For this to work, 0.7.1 will need to have the "bounce" feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1970) Message version resolution

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-1970:
--------------------------------------

    Attachment: 1970.txt

Here is a sketch of what the inferring approach would look like.

> Message version resolution
> --------------------------
>
>                 Key: CASSANDRA-1970
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1970
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Gary Dusbabek
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: 1970.txt
>
>
> When a new new node (version N) contacts an old node (version N-1) for the first time, the old node will not understand the message.  One resolution mechanism would be for the old node to "bounce" the message back to the sender.  The sender would then respond by translating the message to the appropriate version and resending it.
> For this to work, 0.7.1 will need to have the "bounce" feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1970) Message version resolution

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980428#action_12980428 ] 

Jonathan Ellis commented on CASSANDRA-1970:
-------------------------------------------

Can't we just have a version-announce feature (gossip?) that Must Never Change so we don't have to add the extra complexity of bouncing?

In this case it is easier to ask permission than forgiveness. :)

> Message version resolution
> --------------------------
>
>                 Key: CASSANDRA-1970
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1970
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Gary Dusbabek
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>
> When a new new node (version N) contacts an old node (version N-1) for the first time, the old node will not understand the message.  One resolution mechanism would be for the old node to "bounce" the message back to the sender.  The sender would then respond by translating the message to the appropriate version and resending it.
> For this to work, 0.7.1 will need to have the "bounce" feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1970) Message version resolution

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980511#action_12980511 ] 

Gary Dusbabek commented on CASSANDRA-1970:
------------------------------------------

bq. Old nodes talking to new is no problem, it reads version off the header and deserializes appropriately.
'it' meaning the version N node, yes.

bq. New node can't talk to old nodes initially because they read version and have to drop it, they don't have that code.
Right.

bq. But as soon as new node knows the version of one of the old ones (i.e. as soon as it gets a gossip message) it can update a Map of {inetaddress, version} w/ the right value and we are good. No bounce required.
How wil N get a gossip message (a response) from N-1 if N-1 is rejecting every attempt of N trying to introduce itself?  Keep in mind that N-1 is dropping those messages before they ever make it into the gossip code.


> Message version resolution
> --------------------------
>
>                 Key: CASSANDRA-1970
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1970
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Gary Dusbabek
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>
> When a new new node (version N) contacts an old node (version N-1) for the first time, the old node will not understand the message.  One resolution mechanism would be for the old node to "bounce" the message back to the sender.  The sender would then respond by translating the message to the appropriate version and resending it.
> For this to work, 0.7.1 will need to have the "bounce" feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1970) Message version resolution

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980506#action_12980506 ] 

Jonathan Ellis commented on CASSANDRA-1970:
-------------------------------------------

bq. We don't. 

So, given a ring of N-1, and version N joins:

Old nodes talking to new is no problem, it reads version off the header and deserializes appropriately.

New node can't talk to old nodes initially because they read version and have to drop it, they don't have that code.

But as soon as new node knows the version of one of the old ones (i.e. as soon as it gets a gossip message) it can update a Map of {inetaddress, version} w/ the right value and we are good.  No bounce required.

Right?

> Message version resolution
> --------------------------
>
>                 Key: CASSANDRA-1970
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1970
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Gary Dusbabek
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>
> When a new new node (version N) contacts an old node (version N-1) for the first time, the old node will not understand the message.  One resolution mechanism would be for the old node to "bounce" the message back to the sender.  The sender would then respond by translating the message to the appropriate version and resending it.
> For this to work, 0.7.1 will need to have the "bounce" feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1970) Message version resolution

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12988500#action_12988500 ] 

Jonathan Ellis commented on CASSANDRA-1970:
-------------------------------------------

+1

> Message version resolution
> --------------------------
>
>                 Key: CASSANDRA-1970
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1970
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Gary Dusbabek
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.7.2
>
>         Attachments: 1970.txt, v3-0001-ignore-messages-from-newer-versions-keep-track-of-node.txt
>
>
> When a new new node (version N) contacts an old node (version N-1) for the first time, the old node will not understand the message.  One resolution mechanism would be for the old node to "bounce" the message back to the sender.  The sender would then respond by translating the message to the appropriate version and resending it.
> For this to work, 0.7.1 will need to have the "bounce" feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1970) Message version resolution

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980515#action_12980515 ] 

Jonathan Ellis commented on CASSANDRA-1970:
-------------------------------------------

bq. How wil N get a gossip message (a response) from N-1 if N-1 is rejecting every attempt of N trying to introduce itself?

Ah, okay, I get it now.  Thanks.

What if we added anyone we get a message from to the gossip ring (initially as a tokenless member)?  That would let us "bootstrap" the gossip on the existing nodes' side.

> Message version resolution
> --------------------------
>
>                 Key: CASSANDRA-1970
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1970
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Gary Dusbabek
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>
> When a new new node (version N) contacts an old node (version N-1) for the first time, the old node will not understand the message.  One resolution mechanism would be for the old node to "bounce" the message back to the sender.  The sender would then respond by translating the message to the appropriate version and resending it.
> For this to work, 0.7.1 will need to have the "bounce" feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1970) Message version resolution

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980473#action_12980473 ] 

Jonathan Ellis commented on CASSANDRA-1970:
-------------------------------------------

it only restricts gossip, which isn't A Big Deal since it's so little traffic.

so how about this?  we try to parse gossip packets in the current version; if that fails, we parse in the old version.  we don't accept commands from a node until we have its version.

-----

hang on, don't we already have a per-message version field in the message first-bytes-sent?  i think it's reasonable to say "first int is always "magic," second is always bitfield containing version, streaming flag, etc.  I'm willing to commit to that indefinitely.

> Message version resolution
> --------------------------
>
>                 Key: CASSANDRA-1970
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1970
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Gary Dusbabek
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>
> When a new new node (version N) contacts an old node (version N-1) for the first time, the old node will not understand the message.  One resolution mechanism would be for the old node to "bounce" the message back to the sender.  The sender would then respond by translating the message to the appropriate version and resending it.
> For this to work, 0.7.1 will need to have the "bounce" feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1970) Message version resolution

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980500#action_12980500 ] 

Gary Dusbabek commented on CASSANDRA-1970:
------------------------------------------

bq. I don't get it. Why do we need any other hacks to find out version, given this?
We don't.  Getting the version is trivial.  A version N-1 node will get that value, realize that it doesn't match it's version and drop the message (or resolve it--that's the point of this ticket).  A version N node will get it and translate it (the subject of another ticket).

I'm trying to point out your earlier suggestion (preserving the serialization of gossip messages) goes a lot further than those first 8 bytes and locks us into the serialization format of Message and Header, or introduces a lot of special casing.

> Message version resolution
> --------------------------
>
>                 Key: CASSANDRA-1970
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1970
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Gary Dusbabek
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>
> When a new new node (version N) contacts an old node (version N-1) for the first time, the old node will not understand the message.  One resolution mechanism would be for the old node to "bounce" the message back to the sender.  The sender would then respond by translating the message to the appropriate version and resending it.
> For this to work, 0.7.1 will need to have the "bounce" feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1970) Message version resolution

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-1970:
-------------------------------------

    Attachment: v2-0001-ignore-messages-from-newer-versions-keep-track-of-node.txt

> Message version resolution
> --------------------------
>
>                 Key: CASSANDRA-1970
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1970
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Gary Dusbabek
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.7.1
>
>         Attachments: 1970.txt, v1-0001-bounce-messages-from-newer-versions.txt, v2-0001-ignore-messages-from-newer-versions-keep-track-of-node.txt
>
>
> When a new new node (version N) contacts an old node (version N-1) for the first time, the old node will not understand the message.  One resolution mechanism would be for the old node to "bounce" the message back to the sender.  The sender would then respond by translating the message to the appropriate version and resending it.
> For this to work, 0.7.1 will need to have the "bounce" feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1970) Message version resolution

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12988795#comment-12988795 ] 

Hudson commented on CASSANDRA-1970:
-----------------------------------

Integrated in Cassandra-0.7 #231 (See [https://hudson.apache.org/hudson/job/Cassandra-0.7/231/])
    ignore messages from the future. keep track of nodes in gossip regardless. patch by gdusbabek, reviewed by jbellis. CASSANDRA-1970


> Message version resolution
> --------------------------
>
>                 Key: CASSANDRA-1970
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1970
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Gary Dusbabek
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.7.2
>
>         Attachments: 1970.txt, v3-0001-ignore-messages-from-newer-versions-keep-track-of-node.txt
>
>
> When a new new node (version N) contacts an old node (version N-1) for the first time, the old node will not understand the message.  One resolution mechanism would be for the old node to "bounce" the message back to the sender.  The sender would then respond by translating the message to the appropriate version and resending it.
> For this to work, 0.7.1 will need to have the "bounce" feature.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CASSANDRA-1970) Message version resolution

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984765#action_12984765 ] 

Jonathan Ellis commented on CASSANDRA-1970:
-------------------------------------------

bq. What is the purpose of applying local state? 

That will kick off "this node is part of the gossip ring" activity, so even if an old cluster can't understand anything but the version a new node is sending, they will start sending it old-version messages, so the new node will in turn learn the versions of the old ones and know how to talk back to them.

bq. I'm pretty sure we don't want to assert old == version (like in the case of a node being upgraded).

Makes sense ... so you'd want to change the putIfAbsent to just put.

> Message version resolution
> --------------------------
>
>                 Key: CASSANDRA-1970
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1970
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Gary Dusbabek
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: 1970.txt
>
>
> When a new new node (version N) contacts an old node (version N-1) for the first time, the old node will not understand the message.  One resolution mechanism would be for the old node to "bounce" the message back to the sender.  The sender would then respond by translating the message to the appropriate version and resending it.
> For this to work, 0.7.1 will need to have the "bounce" feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1970) Message version resolution

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980486#action_12980486 ] 

Gary Dusbabek commented on CASSANDRA-1970:
------------------------------------------

bq. hang on, don't we already have a per-message version field in the message first-bytes-sent? i think it's reasonable to say...
Yes.  That is the "envelope" supplied by MS.packit().  We need to adhere to the first 8 bytes of that format forever.  Once we know the version, we have a lot of flexibility, meaning that the wire format for o.a.c.net.Message can change whenever we need it to.

bq. it only restricts gossip, which isn't A Big Deal since it's so little traffic.
There are two problems with this.  First, it locks us down to the serialization outlined in MessageSerializer (to include HeaderSerializer).  That removes a lot of flexibility if we are ever interested in changing those formats.  Second, it introduces two code paths by special casing gossip messages.

bq. so how about this? we try to parse gossip packets in the current version; if that fails, we parse in the old version
That wouldn't work if a N node was trying to join a cluster of N-1 nodes.  (The N-1 nodes can't speak a protocol from the future.)

What if, when communication starts up, messages are sent in the current format and the previous format until for format of the destination is known (after a response is received)?  Kind of a hack, but it avoids bouncing, locking serialization formats and special casing gossip messages.

> Message version resolution
> --------------------------
>
>                 Key: CASSANDRA-1970
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1970
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Gary Dusbabek
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>
> When a new new node (version N) contacts an old node (version N-1) for the first time, the old node will not understand the message.  One resolution mechanism would be for the old node to "bounce" the message back to the sender.  The sender would then respond by translating the message to the appropriate version and resending it.
> For this to work, 0.7.1 will need to have the "bounce" feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1970) Message version resolution

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984754#action_12984754 ] 

Gary Dusbabek commented on CASSANDRA-1970:
------------------------------------------

This is basically the approach I've taken, except I put the map in MessagingService.

What is the purpose of applying local state?  I'm pretty sure we don't want to assert old == version (like in the case of a node being upgraded).

> Message version resolution
> --------------------------
>
>                 Key: CASSANDRA-1970
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1970
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Gary Dusbabek
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: 1970.txt
>
>
> When a new new node (version N) contacts an old node (version N-1) for the first time, the old node will not understand the message.  One resolution mechanism would be for the old node to "bounce" the message back to the sender.  The sender would then respond by translating the message to the appropriate version and resending it.
> For this to work, 0.7.1 will need to have the "bounce" feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1970) Message version resolution

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980429#action_12980429 ] 

Gary Dusbabek commented on CASSANDRA-1970:
------------------------------------------

I don't think relying on gossip is reliable enough.  For instance, consider a N node joining a cluster of N-1 nodes.  The first message sent will be a gossip message that likely won't be understood.

> Message version resolution
> --------------------------
>
>                 Key: CASSANDRA-1970
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1970
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Gary Dusbabek
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>
> When a new new node (version N) contacts an old node (version N-1) for the first time, the old node will not understand the message.  One resolution mechanism would be for the old node to "bounce" the message back to the sender.  The sender would then respond by translating the message to the appropriate version and resending it.
> For this to work, 0.7.1 will need to have the "bounce" feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1970) Message version resolution

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-1970:
-------------------------------------

    Fix Version/s:     (was: 0.8)
                   0.7.1

> Message version resolution
> --------------------------
>
>                 Key: CASSANDRA-1970
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1970
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Gary Dusbabek
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.7.1
>
>         Attachments: 1970.txt
>
>
> When a new new node (version N) contacts an old node (version N-1) for the first time, the old node will not understand the message.  One resolution mechanism would be for the old node to "bounce" the message back to the sender.  The sender would then respond by translating the message to the appropriate version and resending it.
> For this to work, 0.7.1 will need to have the "bounce" feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1970) Message version resolution

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-1970:
-------------------------------------

    Attachment: v3-0001-ignore-messages-from-newer-versions-keep-track-of-node.txt

> Message version resolution
> --------------------------
>
>                 Key: CASSANDRA-1970
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1970
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Gary Dusbabek
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.7.2
>
>         Attachments: 1970.txt, v3-0001-ignore-messages-from-newer-versions-keep-track-of-node.txt
>
>
> When a new new node (version N) contacts an old node (version N-1) for the first time, the old node will not understand the message.  One resolution mechanism would be for the old node to "bounce" the message back to the sender.  The sender would then respond by translating the message to the appropriate version and resending it.
> For this to work, 0.7.1 will need to have the "bounce" feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1970) Message version resolution

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Dusbabek updated CASSANDRA-1970:
-------------------------------------

    Attachment:     (was: v1-0001-bounce-messages-from-newer-versions.txt)

> Message version resolution
> --------------------------
>
>                 Key: CASSANDRA-1970
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1970
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Gary Dusbabek
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.7.2
>
>         Attachments: 1970.txt, v3-0001-ignore-messages-from-newer-versions-keep-track-of-node.txt
>
>
> When a new new node (version N) contacts an old node (version N-1) for the first time, the old node will not understand the message.  One resolution mechanism would be for the old node to "bounce" the message back to the sender.  The sender would then respond by translating the message to the appropriate version and resending it.
> For this to work, 0.7.1 will need to have the "bounce" feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1970) Message version resolution

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980491#action_12980491 ] 

Jonathan Ellis commented on CASSANDRA-1970:
-------------------------------------------

bq. Yes. That is the "envelope" supplied by MS.packit(). We need to adhere to the first 8 bytes of that format forever.

I don't get it.  Why do we need any other hacks to find out version, given this?

> Message version resolution
> --------------------------
>
>                 Key: CASSANDRA-1970
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1970
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Gary Dusbabek
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>
> When a new new node (version N) contacts an old node (version N-1) for the first time, the old node will not understand the message.  One resolution mechanism would be for the old node to "bounce" the message back to the sender.  The sender would then respond by translating the message to the appropriate version and resending it.
> For this to work, 0.7.1 will need to have the "bounce" feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1970) Message version resolution

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980433#action_12980433 ] 

Jonathan Ellis commented on CASSANDRA-1970:
-------------------------------------------

Sure, but it still seems like it is easier to say "The first gossip message will always follow this format" and keep that in legacy mode if necessary, than to add this extra layer.

> Message version resolution
> --------------------------
>
>                 Key: CASSANDRA-1970
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1970
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Gary Dusbabek
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>
> When a new new node (version N) contacts an old node (version N-1) for the first time, the old node will not understand the message.  One resolution mechanism would be for the old node to "bounce" the message back to the sender.  The sender would then respond by translating the message to the appropriate version and resending it.
> For this to work, 0.7.1 will need to have the "bounce" feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1970) Message version resolution

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980461#action_12980461 ] 

Gary Dusbabek commented on CASSANDRA-1970:
------------------------------------------

Of course that would be easier.  But it would commit us to never altering the format of MessageSerializer and adhering to the enveloping technique used by MessagingService.packit().  It binds us too much IMO.

> Message version resolution
> --------------------------
>
>                 Key: CASSANDRA-1970
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1970
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Gary Dusbabek
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.8
>
>
> When a new new node (version N) contacts an old node (version N-1) for the first time, the old node will not understand the message.  One resolution mechanism would be for the old node to "bounce" the message back to the sender.  The sender would then respond by translating the message to the appropriate version and resending it.
> For this to work, 0.7.1 will need to have the "bounce" feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (CASSANDRA-1970) Message version resolution

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12985947#action_12985947 ] 

Gary Dusbabek edited comment on CASSANDRA-1970 at 1/24/11 5:02 PM:
-------------------------------------------------------------------

I like the bouncing approach because it is simple and less invasive than modifying gossip. attached as v1.

      was (Author: gdusbabek):
    I like the bouncing approach because it is simple and less invasive than modifying gossip.
  
> Message version resolution
> --------------------------
>
>                 Key: CASSANDRA-1970
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1970
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Gary Dusbabek
>            Assignee: Gary Dusbabek
>            Priority: Minor
>             Fix For: 0.7.1
>
>         Attachments: 1970.txt, v1-0001-bounce-messages-from-newer-versions.txt, v2-0001-ignore-messages-from-newer-versions-keep-track-of-node.txt
>
>
> When a new new node (version N) contacts an old node (version N-1) for the first time, the old node will not understand the message.  One resolution mechanism would be for the old node to "bounce" the message back to the sender.  The sender would then respond by translating the message to the appropriate version and resending it.
> For this to work, 0.7.1 will need to have the "bounce" feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.