You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sylvain Lebresne (JIRA)" <ji...@apache.org> on 2017/08/29 09:54:00 UTC

[jira] [Commented] (CASSANDRA-13711) Invalid writetime for null columns in cqlsh

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

Sylvain Lebresne commented on CASSANDRA-13711:
----------------------------------------------

The unit tests committed with that ticket are pretty fragile because they insert with a TTL of 100 and expect a following read to get the same TTL of 100, but a read give you the remaining TTL (and this is returning with a 1 second precision), so on a slow run or through some timing issue you can easily get a failure with:
{noformat}
junit.framework.AssertionFailedError: Invalid value for row 0 column 3 (ttl(i) of type int), expected <100> but got <99>
	at org.apache.cassandra.cql3.CQLTester.assertRows(CQLTester.java:1255)
	at org.apache.cassandra.cql3.validation.operations.SelectTest.testMixedTTLOnColumnsWide(SelectTest.java:4806)
{noformat}
[~jjirsa]: Would you mind having a look at making those tests less flaky? (personally don't mind if you'd rather ninja-fix).

> Invalid writetime for null columns in cqlsh
> -------------------------------------------
>
>                 Key: CASSANDRA-13711
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13711
>             Project: Cassandra
>          Issue Type: Bug
>          Components: CQL
>            Reporter: Jeff Jirsa
>            Assignee: Jeff Jirsa
>             Fix For: 3.0.15, 3.11.1, 4.0
>
>
> From the user list:
> https://lists.apache.org/thread.html/448731c029eee72e499fc6acd44d257d1671193f850a68521c2c6681@%3Cuser.cassandra.apache.org%3E
> {code}
> (oss-ccm) MacBook-Pro:~ jjirsa$ ccm create test -n 1 -s -v 3.0.10
> Current cluster is now: test
> (oss-ccm) MacBook-Pro:~ jjirsa$ ccm node1 cqlsh
> Connected to test at 127.0.0.1:9042.
> [cqlsh 5.0.1 | Cassandra 3.0.10 | CQL spec 3.4.0 | Native protocol v4]
> Use HELP for help.
> cqlsh> CREATE KEYSPACE test WITH replication = {'class':'SimpleStrategy', 'replication_factor': 1};
> cqlsh> CREATE TABLE test.t ( a text primary key, b text );
> cqlsh> insert into test.t(a) values('z');
> cqlsh> insert into test.t(a) values('w');
> cqlsh> insert into test.t(a) values('e');
> cqlsh> insert into test.t(a) values('r');
> cqlsh> insert into test.t(a) values('t');
> cqlsh> select a,b, writetime (b) from test.t;
> a | b | writetime(b)
> ---+------+--------------
> z | null | null
> e | null | null
> r | null | null
> w | null | null
> t | null | null
> (5 rows)
> cqlsh>
> cqlsh> insert into test.t(a,b) values('t','x');
> cqlsh> insert into test.t(a) values('b');
> cqlsh> select a,b, writetime (b) from test.t;
>  a | b    | writetime(b)
> ---+------+------------------
>  z | null |             null
>  e | null |             null
>  r | null |             null
>  w | null |             null
>  t |    x | 1500565131354883
>  b | null | 1500565131354883
> (6 rows)
> {code}
> Data on disk:
> {code}
> MacBook-Pro:~ jjirsa$ ~/.ccm/repository/3.0.14/tools/bin/sstabledump /Users/jjirsa/.ccm/test/node1/data0/test/t-bed196006d0511e7904be9daad294861/mc-1-big-Data.db
> [
>   {
>     "partition" : {
>       "key" : [ "z" ],
>       "position" : 0
>     },
>     "rows" : [
>       {
>         "type" : "row",
>         "position" : 20,
>         "liveness_info" : { "tstamp" : "2017-07-20T04:41:54.818118Z" },
>         "cells" : [ ]
>       }
>     ]
>   },
>   {
>     "partition" : {
>       "key" : [ "e" ],
>       "position" : 21
>     },
>     "rows" : [
>       {
>         "type" : "row",
>         "position" : 44,
>         "liveness_info" : { "tstamp" : "2017-07-20T04:42:04.288547Z" },
>         "cells" : [ ]
>       }
>     ]
>   },
>   {
>     "partition" : {
>       "key" : [ "r" ],
>       "position" : 45
>     },
>     "rows" : [
>       {
>         "type" : "row",
>         "position" : 68,
>         "liveness_info" : { "tstamp" : "2017-07-20T04:42:08.991417Z" },
>         "cells" : [ ]
>       }
>     ]
>   },
>   {
>     "partition" : {
>       "key" : [ "w" ],
>       "position" : 69
>     },
>     "rows" : [
>       {
>         "type" : "row",
>         "position" : 92,
>         "liveness_info" : { "tstamp" : "2017-07-20T04:41:59.005382Z" },
>         "cells" : [ ]
>       }
>     ]
>   },
>   {
>     "partition" : {
>       "key" : [ "t" ],
>       "position" : 93
>     },
>     "rows" : [
>       {
>         "type" : "row",
>         "position" : 120,
>         "liveness_info" : { "tstamp" : "2017-07-20T15:38:51.354883Z" },
>         "cells" : [
>           { "name" : "b", "value" : "x" }
>         ]
>       }
>     ]
>   },
>   {
>     "partition" : {
>       "key" : [ "b" ],
>       "position" : 121
>     },
>     "rows" : [
>       {
>         "type" : "row",
>         "position" : 146,
>         "liveness_info" : { "tstamp" : "2017-07-20T15:39:03.631297Z" },
>         "cells" : [ ]
>       }
>     ]
>   }
> ]MacBook-Pro:~ jjirsa$
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org