cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-6505) counters++ global shards 2.0 back port
Date Wed, 08 Jan 2014 20:22:52 GMT


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:
>             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

View raw message