incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Morton <aa...@thelastpickle.com>
Subject Re: Query returns incomplete result
Date Mon, 19 May 2014 08:38:34 GMT
Calling execute the second time runs the query a second time, and it looks like the query mutates
instance state during the pagination. 

What happens if you only call execute() once ? 

Cheers
Aaron

-----------------
Aaron Morton
New Zealand
@aaronmorton

Co-Founder & Principal Consultant
Apache Cassandra Consulting
http://www.thelastpickle.com

On 8/05/2014, at 8:03 pm, Lu, Boying <Boying.Lu@emc.com> wrote:

> Hi, All,
>  
> I use the astyanax 1.56.48 + Cassandra 2.0.6 in my test codes and do some query like
this:
>  
> query = keyspace.prepareQuery(..).getKey(…)
> .autoPaginate(true)
> .withColumnRange(new RangeBuilder().setLimit(pageSize).build());
>  
> ColumnList<IndexColumnName> result;
> result= query.execute().getResult();
> while (!result.isEmpty()) {
> //handle result here
> result= query.execute().getResult();
> }
>  
> There are 2003 records in the DB, if the pageSize is set to 1100, I get only 2002 records
back.
> and if the pageSize is set to 3000, I can get the all 2003 records back.
>  
> Does anyone know why? Is it a bug?
>  
> Thanks
>  
> Boying


Mime
View raw message