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

Gary Dusbabek commented on CASSANDRA-1186:
------------------------------------------

Minor nits:  
* DOB.buffer() could be private.
* No point in implementing OB.reset().
* Why OB.asByteArray instead of overwriting toByteArray?

Less minor:
* I don't see the utility of 0007. I think it increases the coupling.
* Why store the keyspace in a single column? Writes were atomic before when 
they were in a single ColumnFamily.

I think you should go further and get rid of all the members in CFMD and KSMD.  
Those classes should just end up as statics collectors that act on avro 
objects.  When I first investigated this, the only schema departure I found was 
adding a cfid to CfDef.  I think things would be tidier if CfDef/ColumnFamily 
and KsDef/Keyspace were the same.  The duplication bothers me and I think we 
can do better.

> futureproof [KS|CF]MetaData
> ---------------------------
>
>                 Key: CASSANDRA-1186
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1186
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.7
>            Reporter: Jonathan Ellis
>            Assignee: Stu Hood
>            Priority: Critical
>             Fix For: 0.7
>
>         Attachments: 
> 0001-Move-Yaml-related-classes-aside-to-reuse-names.patch, 
> 0002-Extract-Avro-generation-and-begin-generating-an-inte.patch, 
> 0003-Split-OutputBuffer-out-for-reuse.patch, 
> 0004-Add-utility-functions-for-dealing-with-Avro-serializ.patch, 
> 0005-Replace-serialization-code-in-KS-CF-CMetaData.patch, 
> 0006-Port-Migrations-and-DefsTable-to-Avro.patch, 
> 0007-Separate-Definitions-from-Migrations.patch
>
>
> KSMetaData/CFMetaData serialization is fragile.  We need to be able to add 
> fields easily without breaking when we read old-style serialized bytes.
> Avro and Thrift are designed to handle this.  We should probably use one of 
> those rather than re-inventing the wheel.  If Avro is mature enough for this 
> then let's use that, otherwise let's use Thrift.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to