Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 609CD112FB for ; Mon, 19 May 2014 08:39:10 +0000 (UTC) Received: (qmail 47943 invoked by uid 500); 19 May 2014 08:39:08 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 47898 invoked by uid 500); 19 May 2014 08:39:08 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 47890 invoked by uid 99); 19 May 2014 08:39:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 May 2014 08:39:08 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [209.85.220.41] (HELO mail-pa0-f41.google.com) (209.85.220.41) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 May 2014 08:39:04 +0000 Received: by mail-pa0-f41.google.com with SMTP id lj1so5517114pab.0 for ; Mon, 19 May 2014 01:38:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:content-type:message-id:mime-version :subject:date:references:to:in-reply-to; bh=XAieNUgcZuG2RCxN1MFjrYA05EV72EqOVK0h4+jYViE=; b=L7R1j9bAHetFGbAu7Y87/1ICiT7F1q9UJSSESBvz7vrmpLLGyAq8MwodcLotCFQEN2 t/HGR/GQorixIUe7li5Ek5Xb+CbQNca05CDMCufcSG1AcGSM2pdAPQYDh2sZH/H1lKpF GQWnfTtkeOLtOOh+szMlj3/45jXRaUbLZg1i8w3OveovGfj2BRC6Uffyo8EhIaRKYTOx t9OIqzENHW0dLJHKXXvBG88P9KkWE69M8vZZsuZXHeTp/GrGBMMYWzqoCln/nmHbW/Pg P3S+FsvrXkb8JWixw+AMBXxNYLj8myMMl5tEjIZD54ydAGZtE2lADebWwXPj+HA2SUad k5Eg== X-Gm-Message-State: ALoCoQkzsJ1+lhSycUlEePLhOjVQCw6CWayjNeZYacCBgqf4VM0cdGBCuXeaYAXwFXefs1Lu3NIw X-Received: by 10.66.171.138 with SMTP id au10mr7047825pac.102.1400488720315; Mon, 19 May 2014 01:38:40 -0700 (PDT) Received: from [172.16.1.9] ([203.86.207.101]) by mx.google.com with ESMTPSA id qh2sm72678957pab.13.2014.05.19.01.38.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 19 May 2014 01:38:39 -0700 (PDT) From: Aaron Morton Content-Type: multipart/alternative; boundary="Apple-Mail=_3426D908-27ED-4788-8BB0-F3237D93A14E" Message-Id: <25909DCE-F20B-457D-9CEB-5025D942FBC3@thelastpickle.com> Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Subject: Re: Query returns incomplete result Date: Mon, 19 May 2014 20:38:34 +1200 References: To: Cassandra User In-Reply-To: X-Mailer: Apple Mail (2.1874) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_3426D908-27ED-4788-8BB0-F3237D93A14E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Calling execute the second time runs the query a second time, and it = looks like the query mutates instance state during the pagination.=20 What happens if you only call execute() once ?=20 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 wrote: > Hi, All, > =20 > I use the astyanax 1.56.48 + Cassandra 2.0.6 in my test codes and do = some query like this: > =20 > query =3D keyspace.prepareQuery(..).getKey(=85) > .autoPaginate(true) > .withColumnRange(new RangeBuilder().setLimit(pageSize).build()); > =20 > ColumnList result; > result=3D query.execute().getResult(); > while (!result.isEmpty()) { > //handle result here > result=3D query.execute().getResult(); > } > =20 > 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. > =20 > Does anyone know why? Is it a bug? > =20 > Thanks > =20 > Boying --Apple-Mail=_3426D908-27ED-4788-8BB0-F3237D93A14E Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252 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
<= /div>

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 =3D = keyspace.prepareQuery(..).getKey(=85)
.autoPaginate(true)
.withColumnRange(new = RangeBuilder().setLimit(pageSize).build());
=
 
ColumnList<IndexColumnName> = result;
result=3D = query.execute().getResult();
while = (!result.isEmpty()) {
//handle result here
result=3D = 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

= --Apple-Mail=_3426D908-27ED-4788-8BB0-F3237D93A14E--