cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Yaskevich (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-1391) Allow Concurrent Schema Migrations
Date Tue, 06 Sep 2011 18:37:10 GMT

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

Pavel Yaskevich commented on CASSANDRA-1391:
--------------------------------------------

bq. Why do we need to do two code paths here? My preference would be to model this on our
Row conflict resolution: for rows, we have a single code path where distinct columns are simply
merged, and for conflicting columns we pick a winner based on user-provided timestamp and,
if necessary, value contents. So the result is guaranteed to be the same on all replicas no
matter what order updates were received in.

Migration merging is more complex process comparing to row merging which is pretty straight-forward,
current approach easily handles all possible conflits without any tie-breakers or coordinators
because it simply detects what modifications where made by each of the migrations starting
from merging one, combines them (modifications) together in isolated schema and updates Schema.instance
_so the resulting schema is guaranteed to be the same on all replicas no matter what order
migrations were received in_.

bq. Seems to me this would make the "isolation" complexity go away.

I still think that this is the simplest solution of all proposed because actual modifications
are: KSMetaData/CFMetaData.diff(...) methods to detect modified fields, one flag member Migration.isolated
to indicate that migration is running in the isolated mode and one method to update system
Schema.instance with resulting Schema after all migrations where applied.

> Allow Concurrent Schema Migrations
> ----------------------------------
>
>                 Key: CASSANDRA-1391
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1391
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Stu Hood
>            Assignee: Pavel Yaskevich
>             Fix For: 1.0
>
>         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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message