[ https://issues.apache.org/jira/browse/CASSANDRA-1391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149904#comment-13149904 ]
Jonathan Ellis edited comment on CASSANDRA-1391 at 11/14/11 8:58 PM: --------------------------------------------------------------------- For example, suppose we have two clients C1 and C2, and two nodes A and B. They have a columnfamily that includes the following options: {noformat} ColumnFamily1: { 'default_validation_class': 'bytes', 'comment': 'an example', 'row_cache_size': 0 } {noformat} Next, C1 and C2 update ColumnFamily1 with M1 and M2 as follows: {noformat} M1 = ColumnFamily1: {'d_v_c': 'ascii', 'comment': 'foo'} @ T1}} M2 = ColumnFamily1: {'d_v_c': 'utf8', 'row_cache_size': 1000000} @ T0 < T1 {noformat} (Note that we have a conflict on default_validation_class.) Node A receives M1 first, while node B receives M2 first. *Node A:* {noformat} (applies M1) ColumnFamily1: { 'default_validation_class': 'ascii', 'comment': 'foo', 'row_cache_size': 0 } (applies M2) ColumnFamily1: { 'default_validation_class': 'ascii', // M2.dvc has no effect since T0 < T1 'comment': 'foo', 'row_cache_size': 1000000 } {noformat} *Node B:* {noformat} (applies M2) ColumnFamily1: { 'default_validation_class': 'utf8', 'comment': 'an example', 'row_cache_size': 1000000 } (applies M1) ColumnFamily1: { 'default_validation_class': 'ascii', 'comment': 'foo', 'row_cache_size': 1000000 } {noformat} Because timestamp-based conflict resolution is commutative, all nodes end with the same schema no matter what order they get the updates in. was (Author: jbellis): For example, suppose we have two clients C1 and C2, and two nodes A and B. They have a columnfamily that includes the following options: {noformat} ColumnFamily1: { 'default_validation_class': 'bytes', 'comment': 'an example', 'row_cache_size': 0 } {noformat} Next, C1 and C2 update ColumnFamily1 with M1 and M2 as follows: {noformat} M1 = ColumnFamily1: {'d_v_c': 'ascii', 'comment': 'foo'} @ T1}} M2 = ColumnFamily1: {'d_v_c': 'utf8', 'row_cache_size': 1000000} @ T0 < T1 {noformat} (Note that we have a conflict on default_validation_class.) Node A receives M1 first, while node B receives M2 first. *Node A:* {noformat} (applies M1) ColumnFamily1: { 'default_validation_class': 'ascii', 'comment': 'foo', 'row_cache_size': 0 } (applies M2) ColumnFamily1: { 'default_validation_class': 'ascii', // M2.dvc has no effect since T0 < T1 'comment': 'foo', 'row_cache_size': 1000000 } {noformat} *Node B:* {noformat} ColumnFamily1: { 'default_validation_class': 'utf8', 'comment': 'an example', 'row_cache_size': 1000000 } (applies M1) ColumnFamily1: { 'default_validation_class': 'ascii', 'comment': 'foo', 'row_cache_size': 1000000 } {noformat} Because timestamp-based conflict resolution is commutative, all nodes end with the same schema no matter what order they get the updates in. > Allow Concurrent Schema Migrations > ---------------------------------- > > Key: CASSANDRA-1391 > URL: https://issues.apache.org/jira/browse/CASSANDRA-1391 > Project: Cassandra > Issue Type: Improvement > Components: Core > Affects Versions: 0.7.0 > Reporter: Stu Hood > Assignee: Pavel Yaskevich > Fix For: 1.1 > > Attachments: CASSANDRA-1391.patch > > > CASSANDRA-1292 fixed multiple migrations started from the same node to > properly queue themselves, but it is still possible for migrations initiated > on different nodes to conflict and leave the cluster in a bad state. Since > the system_add/drop/rename methods are accessible directly from the client > API, they should be completely safe for concurrent use. > It should be possible to allow for most types of concurrent migrations by > converting the UUID schema ID into a VersionVectorClock (as provided by > CASSANDRA-580). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira