mmm, my bad there. 

First schema changes are always flushed to disk, so the commit log is not 
really an issue. 

Second when the commit log replays it just processes the mutations, the "Drop 
keyspace” message comes from MigrationManager.announceKeyspaceDrop() and is not 
called. 

If you can reproduce this in a simple way please create a ticket at 
https://issues.apache.org/jira/browse/CASSANDRA

Cheers


-----------------
Aaron Morton
New Zealand
@aaronmorton

Co-Founder & Principal Consultant
Apache Cassandra Consulting
http://www.thelastpickle.com

On 19/12/2013, at 2:42 am, Desimpel, Ignace <ignace.desim...@nuance.com> wrote:

> I did the test again to get the log information.
>  
> There is a “Drop keyspace” message at the time I drop the keyspace. That 
> actually must be working since after the drop, I do not get any records back.
>  
> But starting from the time of restart, I do not get any “Drop keyspace” 
> message in the log.
>  
> I get the following lines (only part of log here ):
>  
> ……….
> 2013-12-18 14:30:19.385 Initializing system_traces.sessions
> 2013-12-18 14:30:19.387 Initializing system_traces.events
> 2013-12-18 14:30:19.394 Replaying 
> ../../../../data/cac.cassandra.cac/dbcommitlog/CommitLog-3-1387372026304.log, 
> ../../../../data/cac.cassandra.cac/dbcommitlog/CommitLog-3-1387372026305.log
> 2013-12-18 14:30:19.414 Replaying 
> ../../../../data/cac.cassandra.cac/dbcommitlog/CommitLog-3-1387372026304.log
> 2013-12-18 14:30:20.291 CFS(Keyspace='CodeStructure', ColumnFamily='Labels') 
> liveRatio is 10.79257274718398 (just-counted was 10.79257274718398).  
> calculation took 720ms for 6128 columns
> 2013-12-18 14:30:20.331 CFS(Keyspace='CodeStructure', ColumnFamily='Class') 
> liveRatio is 9.787147977470557 (just-counted was 9.574295954941116).  
> calculation took 39ms for 1236 columns
> 2013-12-18 14:30:20.454 CFS(Keyspace='CodeStructure', 
> ColumnFamily='ClassMethod') liveRatio is 10.415524860171194 (just-counted was 
> 10.415524860171194).  calculation took 122ms for 6630 columns
> 2013-12-18 14:30:21.294 Finished reading 
> ../../../../data/cac.cassandra.cac/dbcommitlog/CommitLog-3-1387372026304.log
> 2013-12-18 14:30:21.294 Replaying 
> ../../../../data/cac.cassandra.cac/dbcommitlog/CommitLog-3-1387372026305.log
> 2013-12-18 14:30:21.294 Finished reading 
> ../../../../data/cac.cassandra.cac/dbcommitlog/CommitLog-3-1387372026305.log
> 2013-12-18 14:30:21.298 Enqueuing flush of 
> Memtable-ReverseIntegerFunction@663725448(270/2700 serialized/live bytes, 10 
> ops)
> 2013-12-18 14:30:21.298 Writing 
> Memtable-ReverseIntegerFunction@663725448(270/2700 serialized/live bytes, 10 
> ops)
> ……more flushing of my memtables ……...
> Log replay complete, 42237 replayed mutations
> 2013-12-18 14:30:25.428 Cassandra version: 2.0.2-SNAPSHOT
> 2013-12-18 14:30:25.428 Thrift API version: 19.38.0
> ……
>  
>  
> Regards,
>  
> Ignace Desimpel
>  
>  
> Do you have the logs from after the restart ?
> Did it include a "Drop Keyspace…” INFO level message ?
>  
> Cheers
>  
>  
> -----------------
> Aaron Morton
> New Zealand
> @aaronmorton
>  
> Co-Founder & Principal Consultant
> Apache Cassandra Consulting
> http://www.thelastpickle.com
>  
>  
>  
> From: Desimpel, Ignace 
> Sent: dinsdag 3 december 2013 14:45
> To: user@cassandra.apache.org
> Subject: Commitlog replay makes dropped and recreated keyspace and column 
> family rows reappear
>  
> Hi,
>  
> I have the impression that there is an issue with dropping a keyspace and 
> then recreating the keyspace (and column families), combined with a restart 
> of the database
>  
> My test goes as follows:
>  
> Create keyspace K and column families C.
> Insert rows X0 column family  C0
> Query for X0 : found rows : OK
> Drop keyspace K
> Query for X0 : found no rows : OK
>  
> Create keyspace K and column families C.
> Insert rows X1 column family  C1
> Query for X0 : not found : OK
> Query for X1 : found : OK
>  
> Stop the Cassandra database
> Start the Cassandra database
> Query for X1 : found : OK
> Query for X0 : found : NOT OK !
>  
> Did someone tested this scenario?
>  
> Using : CASSANDRA VERSION 2.02, thrift, java 1.7.x, centos
>  
> Ignace Desimpel

Reply via email to