It looks like using the dynamicComposite is a dangerous action. However, one mistaken insertion causes the database to corrupt seems a little bit too much. Is there anyway to just skip the wrong column.
On Mon, Dec 5, 2011 at 5:31 PM, Sylvain Lebresne <sylv...@datastax.com>wrote: > On Mon, Dec 5, 2011 at 8:19 AM, Boris Yen <yulin...@gmail.com> wrote: > > Hi, > > > > I am using 0.8.7. > > > > I was trying to use DynamicComposite column. After I intentional added a > > column (string:string:uuid) into a record which has previous columns > > inserted with comparator (string:uuid:uuid). I got an exception on the > > cassandra side and an timeout exception on the client (I was actually > > expecting an validation exception on the client). > > By design, the DynamicComposite comparator cannot return a validation > exception in that case. Or rather, since there is nothing specifying how > a column should look like, the only way we could ever hope to return a > validation exception would be to scan the entire row on insertion (which > is out of question). > > > After that when I re-started cassandra, cassandra kept saying that > > "comparator mismatch while comparing two dynamicCompositeType column..." > and > > cassandra never really got started. > > > > Is this a bug? > > No. As said above, this is something we cannot do anything about. > The DynamicCompositeType comparator is by nature a very dangerous > one. One column inserted in the wrong row can corrupt that row (with > recovery involving losing data). > In other words, don't use DynamicCompositeType. Don't use it unless > you are absolutely sure you won't ever insert the wrong column in the > wrong row *and* you absolutely need the DynamicCompositeType (by > opposition to the faster, cheaper and safe CompositeType). And if you > do, you have to assume the consequence if you do mess up. > > -- > Sylvain > > -- > Sylvain >