You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Ignace Desimpel (JIRA)" <ji...@apache.org> on 2014/02/07 14:24:19 UTC

[jira] [Commented] (CASSANDRA-6677) Commitlog replay makes dropped and recreated keyspace and column family rows reappear

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

Ignace Desimpel commented on CASSANDRA-6677:
--------------------------------------------

Mail thread
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



> Commitlog replay makes dropped and recreated keyspace and column family rows reappear
> -------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-6677
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6677
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Ignace Desimpel
>            Priority: Minor
>             Fix For: 2.0.4
>
>
> A row can reappear after reboot of the database if the keyspace was dropped and recreated and then rebooted.
> Thus before reboot : Create keyspaceX  + Create ColumnFamilyY + Insert row R + Drop keyspaceX  + Create keyspaceX  + Create ColumnFamilyY . This will result in no rows.
> After reboot, the row R reappears !
> Guess this will apply to all cassandra versions?
> I will attach some sample test code.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)