You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Patrick McFadin (JIRA)" <ji...@apache.org> on 2012/10/31 00:10:12 UTC

[jira] [Created] (CASSANDRA-4882) CQL 3 select output inconsistent on timestamp

Patrick McFadin created CASSANDRA-4882:
------------------------------------------

             Summary: CQL 3 select output inconsistent on timestamp
                 Key: CASSANDRA-4882
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4882
             Project: Cassandra
          Issue Type: Bug
    Affects Versions: 1.2.0 beta 1
            Reporter: Patrick McFadin


Using the same schema defined in https://issues.apache.org/jira/browse/CASSANDRA-4881

select * from video_event;
 videoid_username                           | event | event_timestamp | video_timestamp
--------------------------------------------+-------+-----------------+--------------------------
 99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd | start |    1346636100.0 | 2012-09-02 18:35:00+0000
 99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd | start |    1346634300.0 | 2012-09-02 18:05:00+0000
 99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd |  stop |    1346636250.0 | 2012-09-02 18:37:30+0000
 99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd |  stop |    1346634330.0 | 2012-09-02 18:05:30+0000

And this:

select * from video_event where videoid_username = '99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd' limit 1;
 videoid_username                           | event | event_timestamp | video_timestamp
--------------------------------------------+-------+-----------------+-----------------
 99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd | start |    1346636100.0 |            null

As you can see, we have some different output based on the select statement. The timestamp in both is formatted as a float or a double. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4882) Short read protection don't count columns correctly for CQL3

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13487981#comment-13487981 ] 

Jonathan Ellis commented on CASSANDRA-4882:
-------------------------------------------

LGTM.

Nit: would prefer avoiding allocating unnecessary HashSet in trim when the common case is not to need to trim.
                
> Short read protection don't count columns correctly for CQL3
> ------------------------------------------------------------
>
>                 Key: CASSANDRA-4882
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4882
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.2.0 beta 1
>            Reporter: Patrick McFadin
>            Assignee: Sylvain Lebresne
>             Fix For: 1.2.0 beta 2
>
>         Attachments: 4882.txt
>
>
> Using the same schema defined in https://issues.apache.org/jira/browse/CASSANDRA-4881
> select * from video_event;
>  videoid_username                           | event | event_timestamp | video_timestamp
> --------------------------------------------+-------+-----------------+--------------------------
>  99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd | start |    1346636100.0 | 2012-09-02 18:35:00+0000
>  99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd | start |    1346634300.0 | 2012-09-02 18:05:00+0000
>  99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd |  stop |    1346636250.0 | 2012-09-02 18:37:30+0000
>  99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd |  stop |    1346634330.0 | 2012-09-02 18:05:30+0000
> And this:
> select * from video_event where videoid_username = '99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd' limit 1;
>  videoid_username                           | event | event_timestamp | video_timestamp
> --------------------------------------------+-------+-----------------+-----------------
>  99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd | start |    1346636100.0 |            null
> As you can see, we have some different output based on the select statement. The timestamp in both is formatted as a float or a double. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4882) CQL 3 select output inconsistent on timestamp

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13487356#comment-13487356 ] 

Brandon Williams commented on CASSANDRA-4882:
---------------------------------------------

Formatting appears fixed in cqlsh trunk, but the null is strange.
                
> CQL 3 select output inconsistent on timestamp
> ---------------------------------------------
>
>                 Key: CASSANDRA-4882
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4882
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.2.0 beta 1
>            Reporter: Patrick McFadin
>            Assignee: Sylvain Lebresne
>
> Using the same schema defined in https://issues.apache.org/jira/browse/CASSANDRA-4881
> select * from video_event;
>  videoid_username                           | event | event_timestamp | video_timestamp
> --------------------------------------------+-------+-----------------+--------------------------
>  99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd | start |    1346636100.0 | 2012-09-02 18:35:00+0000
>  99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd | start |    1346634300.0 | 2012-09-02 18:05:00+0000
>  99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd |  stop |    1346636250.0 | 2012-09-02 18:37:30+0000
>  99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd |  stop |    1346634330.0 | 2012-09-02 18:05:30+0000
> And this:
> select * from video_event where videoid_username = '99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd' limit 1;
>  videoid_username                           | event | event_timestamp | video_timestamp
> --------------------------------------------+-------+-----------------+-----------------
>  99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd | start |    1346636100.0 |            null
> As you can see, we have some different output based on the select statement. The timestamp in both is formatted as a float or a double. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-4882) CQL 3 select output inconsistent on timestamp

Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4882?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sylvain Lebresne updated CASSANDRA-4882:
----------------------------------------

    Attachment: 4882.txt

So I'm ignoring the formatting issue since that has been fixed.

Howe the returned null is a legit bug. The problem is that the StorageProxy short read protection hasn't been updated after the changed made by CASSANDRA-3647, namely the fact that SliceQueryFilter now group columns by prefix before counting them.

Attaching a patch that fixes that.
                
> CQL 3 select output inconsistent on timestamp
> ---------------------------------------------
>
>                 Key: CASSANDRA-4882
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4882
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.2.0 beta 1
>            Reporter: Patrick McFadin
>            Assignee: Sylvain Lebresne
>             Fix For: 1.2.0 beta 2
>
>         Attachments: 4882.txt
>
>
> Using the same schema defined in https://issues.apache.org/jira/browse/CASSANDRA-4881
> select * from video_event;
>  videoid_username                           | event | event_timestamp | video_timestamp
> --------------------------------------------+-------+-----------------+--------------------------
>  99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd | start |    1346636100.0 | 2012-09-02 18:35:00+0000
>  99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd | start |    1346634300.0 | 2012-09-02 18:05:00+0000
>  99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd |  stop |    1346636250.0 | 2012-09-02 18:37:30+0000
>  99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd |  stop |    1346634330.0 | 2012-09-02 18:05:30+0000
> And this:
> select * from video_event where videoid_username = '99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd' limit 1;
>  videoid_username                           | event | event_timestamp | video_timestamp
> --------------------------------------------+-------+-----------------+-----------------
>  99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd | start |    1346636100.0 |            null
> As you can see, we have some different output based on the select statement. The timestamp in both is formatted as a float or a double. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-4882) Short read protection don't count columns correctly for CQL3

Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4882?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sylvain Lebresne updated CASSANDRA-4882:
----------------------------------------

    Summary: Short read protection don't count columns correctly for CQL3  (was: CQL 3 select output inconsistent on timestamp)
    
> Short read protection don't count columns correctly for CQL3
> ------------------------------------------------------------
>
>                 Key: CASSANDRA-4882
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4882
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.2.0 beta 1
>            Reporter: Patrick McFadin
>            Assignee: Sylvain Lebresne
>             Fix For: 1.2.0 beta 2
>
>         Attachments: 4882.txt
>
>
> Using the same schema defined in https://issues.apache.org/jira/browse/CASSANDRA-4881
> select * from video_event;
>  videoid_username                           | event | event_timestamp | video_timestamp
> --------------------------------------------+-------+-----------------+--------------------------
>  99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd | start |    1346636100.0 | 2012-09-02 18:35:00+0000
>  99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd | start |    1346634300.0 | 2012-09-02 18:05:00+0000
>  99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd |  stop |    1346636250.0 | 2012-09-02 18:37:30+0000
>  99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd |  stop |    1346634330.0 | 2012-09-02 18:05:30+0000
> And this:
> select * from video_event where videoid_username = '99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd' limit 1;
>  videoid_username                           | event | event_timestamp | video_timestamp
> --------------------------------------------+-------+-----------------+-----------------
>  99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd | start |    1346636100.0 |            null
> As you can see, we have some different output based on the select statement. The timestamp in both is formatted as a float or a double. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (CASSANDRA-4882) CQL 3 select output inconsistent on timestamp

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4882?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brandon Williams reassigned CASSANDRA-4882:
-------------------------------------------

    Assignee: Sylvain Lebresne
    
> CQL 3 select output inconsistent on timestamp
> ---------------------------------------------
>
>                 Key: CASSANDRA-4882
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4882
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.2.0 beta 1
>            Reporter: Patrick McFadin
>            Assignee: Sylvain Lebresne
>
> Using the same schema defined in https://issues.apache.org/jira/browse/CASSANDRA-4881
> select * from video_event;
>  videoid_username                           | event | event_timestamp | video_timestamp
> --------------------------------------------+-------+-----------------+--------------------------
>  99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd | start |    1346636100.0 | 2012-09-02 18:35:00+0000
>  99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd | start |    1346634300.0 | 2012-09-02 18:05:00+0000
>  99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd |  stop |    1346636250.0 | 2012-09-02 18:37:30+0000
>  99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd |  stop |    1346634330.0 | 2012-09-02 18:05:30+0000
> And this:
> select * from video_event where videoid_username = '99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd' limit 1;
>  videoid_username                           | event | event_timestamp | video_timestamp
> --------------------------------------------+-------+-----------------+-----------------
>  99051fe9-6a9c-46c2-b949-38ef78858dd0:ctodd | start |    1346636100.0 |            null
> As you can see, we have some different output based on the select statement. The timestamp in both is formatted as a float or a double. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira