[ 
https://issues.apache.org/jira/browse/CASSANDRA-11618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sylvain Lebresne updated CASSANDRA-11618:
-----------------------------------------
    Assignee: Alex Petrov

> Removing an element from map<any type, tinyint/smallint> corrupts commitlog
> ---------------------------------------------------------------------------
>
>                 Key: CASSANDRA-11618
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11618
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Local Write-Read Paths
>         Environment: Fully updated CentOS 7.2 64-bit (ami-1f5dfe6c: "CentOS 
> 7.2 x86_64 with cloud-init (HVM)") on Amazon's eu-west-1c t2.micro + OpenJDK 
> 1.8.0_77
> Arch Linux 32-bit + OpenJDK 8.u77-1
>            Reporter: Artem Chudinov
>            Assignee: Alex Petrov
>            Priority: Critical
>              Labels: commitlog, regression, serializers
>             Fix For: 3.5, 3.6, 3.0.6
>
>         Attachments: cassandra-trunk-0541597e7-failedlaunch.log, 
> cassandra-trunk-0541597e7-mutation279088679553718337dat
>
>
> 2.2.6 has no this bug.
> I've tried 3.0 alpha 1, 3.0 beta 1, 3.0 beta 2, 3.0.0, 3.0.6, 3.5, 
> datastax-ddc 3.5.0 (from repo), and trunk (3.6) - all of them have this bug. 
> I've found that the error is thrown since 
> d12d2d496540c698f30e9b528b66e8f6636842d3, which is included in 3.0 beta 1 
> (but *not* in the alpha 1).
> Cassandra 3.0 alpha 1 does not throw the error, but forgets about the changes 
> after shutting down.
> Only after rm ./data/commitlog/* , Cassandra starts fine.
> By the way, map<int, boolean> works fine.
> Steps to reproduce:
> {code}
> $ ant build
> $ ./bin/cassandra
> $ ./bin/cqlsh
> {code}
> {code:sql}
> CREATE KEYSPACE bugs
>     WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'}
>     AND durable_writes = true;
> CREATE TABLE bugs.bug1 (
>     id int,
>     m  map<int, tinyint or smallint>, -- key can be any type
>     PRIMARY KEY (id)
> );
> INSERT INTO bugs.bug1 (id, m) VALUES (1, {0: 4, 4: 3});
> UPDATE bugs.bug1 SET m[0]=NULL WHERE id=1;
> -- and/or UPDATE bugs.bug1 SET m[1]=NULL WHERE id=1;
> SELECT * FROM bugs.bug1;
> {code}
> {code}
>  id | m
> ----+--------
>   1 | {4: 3}
> (1 rows)
> {code}
> {code}
> $ ./bin/nodetool stopdaemon
> $ ./bin/cassandra
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to