[
https://issues.apache.org/jira/browse/CASSANDRA-1938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13585732#comment-13585732
]
Kevin Ye commented on CASSANDRA-1938:
-------------------------------------
Ask for help:
There is a problem about counter column in data transfer when a new node join
the cluster. After the node join the cluster successfully, the value of the
counter column is incorrect in the new node that join the cluster.
For details as following:
1、suppose There is just one Node A in the cluster firstly, and there is some
counter column in tow sstables (let's consider a given counter c):
+----------------------------------+
| A |
| |
| SSTALE1 c:[id_A,1, 1] delta |
| SSTALE2 c:[id_A,1, 4] delta |
| |
+----------------------------------+
The counter column in SSTable1 and SSTable2 all are delta.
2、Now bootstrap a new node B to join the cluster and take parts of A rang, so
the data will transfer from A to B , currently include counter column c . Due
to clearing all delta in data transfer from A to B ,so After bootstrap, we will
have something like:
+---------------------------------+
| A |
| |
| SSTALE1 c:[id_A,1, 1] delta |
| SSTALE2 c:[id_A,1, 4] delta |
| |
+---------------------------------+
+--------------------------------------+
| B |
| |
| SSTALE1 c:[id_A,1, 1] non-delta |
| SSTALE2 c:[id_A,1, 4] non-delta |
| |
+--------------------------------------+
Now , if we get value of counter c from node B , it will return a incorrect
value, and at the same time there is a warn log will print where counter merge:
2013-02-25 11:52:56,016 WARN [ReadStage:9]
[org.apache.cassandra.db.context.CounterContext] invalid counter shard
detected; (1d479680-7efe-11e2-0000-ebcb95bae2fd, 1, 1) and
(1d479680-7efe-11e2-0000-ebcb95bae2fd, 1, 3) differ only in count; will pick
highest to self-heal; this indicates a bug or corruption generated a bad
counter shard
> Use UUID as node identifiers in counters instead of IP addresses
> -----------------------------------------------------------------
>
> Key: CASSANDRA-1938
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1938
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: Sylvain Lebresne
> Assignee: Sylvain Lebresne
> Fix For: 0.8 beta 1
>
> Attachments: 0001-Use-uuid-instead-of-IP-for-counters.patch,
> 0002-Merge-old-shard-locally.patch, 0003-Thrift-change-to-CfDef.patch,
> 1938_discussion, 1938-rebase-and-fix-v1.txt
>
> Original Estimate: 56h
> Remaining Estimate: 56h
>
> The use of IP addresses as node identifiers in the partition of a given
> counter is fragile. Changes of the node's IP addresses can result in data
> loss. This patch proposes to use UUIDs instead.
> NOTE: this breaks the on-disk file format (for counters)
--
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