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

Brandon Williams updated CASSANDRA-4383:
----------------------------------------

    Attachment: fix-notifications.txt

We are guaranteed that both states will be received together, however, these 
states are held in a map, then iterated and applied as well as notifying in the 
same loop.  Since map isn't sorted, sometimes this puts STATUS before TOKENS 
and immediately notifies for it, causing the NPE since TOKENS isn't set yet.  
This can also cause problems on token changes, since the status event will fire 
with the old tokens and never update tMD with the new ones.

Patch to make two loops instead, one to set states, and the other to handle 
notifications.
                
> Binary encoding of vnode tokens
> -------------------------------
>
>                 Key: CASSANDRA-4383
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4383
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Brandon Williams
>            Assignee: Brandon Williams
>             Fix For: 1.2.0 beta 1
>
>         Attachments: 
> 0001-Add-HOST_ID-and-TOKENS-app-states-binary-serialization.txt, 
> 0002-Fix-tests.txt, fix-notifications.txt
>
>
> Since after CASSANDRA-4317 we can know which version a remote node is using 
> (that is, whether it is vnode-aware or not) this a good opportunity to change 
> the token encoding to binary, since with a default of 256 tokens per node 
> even a fixed-length 16 byte encoding per token provides a great deal of 
> savings in gossip traffic over a text representation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to