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

Sylvain Lebresne commented on CASSANDRA-6505:
---------------------------------------------

bq. And 'MIN_VALUE + x' seemed cleaner than '-x - 1'

It's just that -x - 1 felt more natural because that's the "encoding" 
Collections.binarySearch actually uses. Anyway, I guess I don't care a whole 
lot, though I do would maybe suggest inlining Short.MIN_VALUE if we keep it the 
way it is. Cause the code do rely on 'index + GLOBAL_SHARD_INDEX_OFFSET' being 
negative and I find that the indirection of having a global constant makes it a 
bit harder to validate that invariant mentally.

> counters++ global shards 2.0 back port
> --------------------------------------
>
>                 Key: CASSANDRA-6505
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6505
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Aleksey Yeschenko
>            Assignee: Aleksey Yeschenko
>             Fix For: 2.0.5
>
>
> CASSANDRA-6504 introduces a new type of shard - 'global' - to 2.1. To enable 
> live upgrade from 2.0 to 2.1, it's necessary that 2.0 nodes are able to 
> understand the new 'global' shards in the counter contexts.
> 2.0 nodes will not produce 'global' shards, but must contain the merge logic.
> It isn't a trivial code change ("non-trivial code in a non-trivial part of 
> the code"), hence this separate JIRA issue.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to