cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tomasz Grabiec (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-12423) Cells missing from compact storage table after upgrading from 2.1.9 to 3.7
Date Fri, 12 Aug 2016 10:26:20 GMT

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

Tomasz Grabiec commented on CASSANDRA-12423:
--------------------------------------------

The range delete was generated using Thrift API's SlicePredicate:

{code}
    def composite(item1, item2=None, eoc='\x00'):
        packed = _i16(len(item1)) + item1 + eoc
        if item2 is not None:
            packed += _i16(len(item2)) + item2
            packed += eoc
        return packed

    def range_delete(self):
        _set_keyspace('ks1')

        mutations = [Mutation(deletion=Deletion(2470761440040513,
                                                predicate=SlicePredicate(slice_range=SliceRange(start=composite('a',
eoc='\x00'), finish=composite('asd', eoc='\x00')))))]

        keyed_mutations = {
            _i32(1): {
                'test': mutations
            }
        }

        client.batch_mutate(keyed_mutations, ConsistencyLevel.ONE)

{code}

I executed above as part of thrift_tests.py from C* dtest.

> Cells missing from compact storage table after upgrading from 2.1.9 to 3.7
> --------------------------------------------------------------------------
>
>                 Key: CASSANDRA-12423
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12423
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Tomasz Grabiec
>            Assignee: Stefania
>
> Schema:
> {code}
> create table ks1.test ( id int, c1 text, c2 text, v int, primary key (id, c1, c2)) with
compact storage and compression = {'sstable_compression': ''};
> {code}
> sstable2json before upgrading:
> {code}
> [
> {"key": "1",
>  "cells": [["","0",1470761440040513],
>            ["a","asd",2470761440040513,"t",1470764842],
>            ["asd:","0",1470761451368658],
>            ["asd:asd","0",1470761449416613]]}
> ]
> {code}
> Query result with 2.1.9:
> {code}
> cqlsh> select * from ks1.test;
>  id | c1  | c2   | v
> ----+-----+------+---
>   1 |     | null | 0
>   1 | asd |      | 0
>   1 | asd |  asd | 0
> (3 rows)
> {code}
> Query result with 3.7:
> {code}
> cqlsh> select * from ks1.test;
>  id | 6331 | 6332 | v
> ----+------+------+---
>   1 |      | null | 0
> (1 rows)
> {code}



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

Mime
View raw message