You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Edward Capriolo (JIRA)" <ji...@apache.org> on 2014/04/04 06:54:14 UTC

[jira] [Commented] (CASSANDRA-6982) start_column in get_page_slice has odd behaivor

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

Edward Capriolo commented on CASSANDRA-6982:
--------------------------------------------

Also I find no coverage of the feature in the python tests:
grep paged  test/system/test_thrift_server.py 

Or in any java based unit test that I can tell: (the following results are from my new test)
[edward@jackintosh unit]$ grep -R paged  ./*
./io/teknek/thrift/PagedTest.java:        List<KeySlice> s = server.get_paged_slice("Standard1", kr, ByteBuffer.wrap(new byte[0]), ConsistencyLevel.ONE);
./io/teknek/thrift/PagedTest.java:        List<KeySlice> t = server.get_paged_slice("Standard1", kr, ByteBufferUtil.bytes("c"), ConsistencyLevel.ONE);
./io/teknek/thrift/PagedTest.java:        List<KeySlice> s = server.get_paged_slice("Standard1", kr, ByteBuffer.wrap(new byte[0]), ConsistencyLevel.ONE);
./io/teknek/thrift/PagedTest.java:        List<KeySlice> t = server.get_paged_slice("Standard1", kr, ByteBufferUtil.bytes("c"), ConsistencyLevel.ONE);


> start_column in get_page_slice has odd behaivor
> -----------------------------------------------
>
>                 Key: CASSANDRA-6982
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6982
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Edward Capriolo
>            Priority: Critical
>
> get_paged_slice is described as so:
> {code}
>  /**
>    returns a range of columns, wrapping to the next rows if necessary to collect max_results.
>   */
>   list<KeySlice> get_paged_slice(1:required string column_family,
>                                  2:required KeyRange range,
>                                  3:required binary start_column,
>                                  4:required ConsistencyLevel consistency_level=ConsistencyLevel.ONE)
>                  throws (1:InvalidRequestException ire, 2:UnavailableException ue, 3:TimedOutException te),
> {code}
> The term max_results is not defined, I take it to mean key_range.count.
> The larger issue I have found is that start_column seems to be ignored in some cases.
> testNormal() produces this error
> junit.framework.ComparisonFailure: null expected:<[c]> but was:<[a]>
> The problem seems to be KeyRanges that use tokens and not keys.
> {code}
> KeyRange kr = new KeyRange();
>       kr.setCount(3);
>       kr.setStart_token("");
>       kr.setEnd_token("");   
> {code}
> A failing test is here:
> https://github.com/edwardcapriolo/cassandra/compare/pg?expand=1
> Is this a bug? It feels like one, or is this just undefined behaviour. If it is a bug I would like to fix. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)