From commits-return-206657-archive-asf-public=cust-asf.ponee.io@cassandra.apache.org Tue Feb 20 04:26:04 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 1AEBB180607 for ; Tue, 20 Feb 2018 04:26:03 +0100 (CET) Received: (qmail 7228 invoked by uid 500); 20 Feb 2018 03:26:03 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 7217 invoked by uid 99); 20 Feb 2018 03:26:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Feb 2018 03:26:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 63C28C1576 for ; Tue, 20 Feb 2018 03:26:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.311 X-Spam-Level: X-Spam-Status: No, score=-110.311 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 5vqxw0mTHxIz for ; Tue, 20 Feb 2018 03:26:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 095E05F24C for ; Tue, 20 Feb 2018 03:26:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 435E2E00A6 for ; Tue, 20 Feb 2018 03:26:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 0537621E5B for ; Tue, 20 Feb 2018 03:26:00 +0000 (UTC) Date: Tue, 20 Feb 2018 03:26:00 +0000 (UTC) From: "Ross Black (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CASSANDRA-14242) Indexed static column returns inconsistent results MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Ross Black created CASSANDRA-14242: -------------------------------------- Summary: Indexed static column returns inconsistent results Key: CASSANDRA-14242 URL: https://issues.apache.org/jira/browse/CASSANDRA-14242 Project: Cassandra Issue Type: Bug Environment: Cassandra 3.11.2 Java driver 3.4.0 Ubuntu - 4.4.0-112-generic Reporter: Ross Black I am using Cassandra 3.11.2, and the Java driver 3.4.0 I have a table that has a static column, where the static column has a seco= ndary index. When querying the table I get incomplete or duplicated results, depending o= n the fetch size. e.g. {code:java} CREATE KEYSPACE hack WITH replication =3D {'class': 'SimpleStrategy', 'repl= ication_factor': 1}; CREATE TABLE hack.stuff (id int, kind text, chunk int static, val1 int, PRI= MARY KEY (id, kind)); CREATE INDEX stuff_chunk_index ON hack.stuff (chunk);{code} -- repeat with thousands of values for id =3D> {code:java} =C2=A0 INSERT INTO hack.stuff (id, chunk, kind, val1 ) VALUES (${id}, 777, = 'A', 123);{code} Querying from Java: {code:java} =C2=A0=C2=A0=C2=A0 final SimpleStatement statement =3D new SimpleStatement(= "SELECT id, kind, val1 FROM hack.stuff WHERE chunk =3D " + chunk);=20 =C2=A0=C2=A0=C2=A0 statement.setFetchSize(fetchSize); =C2=A0=C2=A0=C2=A0 statement.setConsistencyLevel(ConsistencyLevel.ALL); =C2=A0=C2=A0=C2=A0 final ResultSet resultSet =3D connection.getSession().ex= ecute(statement); =C2=A0=C2=A0=C2=A0 for (Row row : resultSet) { =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 final int id =3D row.getInt("id"= ); =C2=A0=C2=A0=C2=A0 }{code} *The number of results returned depends on the fetch-size.* e.g. For 30k values inserted, I get the following: ||fetch-size||result-size|| |40000|30000| |20000|30001| |5000|30006| |100|30303| In production, I have a much larger table where the correct result size for= a specific chunk is 20019, but some fetch sizes will return _significantly= fewer_ results. ||fetch-size||result-size||=C2=A0|| |25000|20019|=C2=A0| |5000|9999|*<=3D=3D this one is has far fewer results*| |5001|20026|=C2=A0| (so far been unable to reproduce this with the simpler test table) Thanks, Ross -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org For additional commands, e-mail: commits-help@cassandra.apache.org