Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5920C11AF5 for ; Mon, 22 Sep 2014 18:54:34 +0000 (UTC) Received: (qmail 60512 invoked by uid 500); 22 Sep 2014 18:54:34 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 60474 invoked by uid 500); 22 Sep 2014 18:54:34 -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 60460 invoked by uid 99); 22 Sep 2014 18:54:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Sep 2014 18:54:34 +0000 Date: Mon, 22 Sep 2014 18:54:33 +0000 (UTC) From: "Shawn Kumar (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-7766) Secondary index not working after a while MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-7766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shawn Kumar updated CASSANDRA-7766: ----------------------------------- Description: cSince 2.1.0-rc2, it appears that the secondary indexes are not always working. Immediately after the INSERT of a row, the index seems to be there. But after a while (I do not know when or why), SELECT statements based on any secondary index do not return the corresponding row(s) anymore. I noticed that a restart of C* may have an impact (the data inserted before the restart may be seen through the index, even if it was not returned before the restart). Here is a use-case example (in order to clarify my request) : {code} CREATE TABLE IF NOT EXISTS ks.cf ( k int PRIMARY KEY, ind ascii, value text); CREATE INDEX IF NOT EXISTS ks_cf_index ON ks.cf(ind); INSERT INTO ks.cf (k, ind, value) VALUES (1, 'toto', 'Hello'); SELECT * FROM ks.cf WHERE ind = 'toto'; // Returns no result after a while {code} The last SELECT statement may or may not return a row depending on the instant of the request. I experienced that with 2.1.0-rc5 through CQLSH with clusters of one and two nodes. Since it depends on the instant of the request, I am not able to deliver any way to reproduce that systematically (It appears to be linked with some scheduled job inside C*). was: Since 2.1.0-rc2, it appears that the secondary indexes are not always working. Immediately after the INSERT of a row, the index seems to be there. But after a while (I do not know when or why), SELECT statements based on any secondary index do not return the corresponding row(s) anymore. I noticed that a restart of C* may have an impact (the data inserted before the restart may be seen through the index, even if it was not returned before the restart). Here is a use-case example (in order to clarify my request) : {code} CREATE TABLE IF NOT EXISTS ks.cf ( k int PRIMARY KEY, ind ascii, value text); CREATE INDEX IF NOT EXISTS ks_cf_index ON ks.cf(ind); INSERT INTO ks.cf (k, ind, value) VALUES (1, 'toto', 'Hello'); SELECT * FROM ks.cf WHERE ind = 'toto'; // Returns no result after a while {code} The last SELECT statement may or may not return a row depending on the instant of the request. I experienced that with 2.1.0-rc5 through CQLSH with clusters of one and two nodes. Since it depends on the instant of the request, I am not able to deliver any way to reproduce that systematically (It appears to be linked with some scheduled job inside C*). > Secondary index not working after a while > ----------------------------------------- > > Key: CASSANDRA-7766 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7766 > Project: Cassandra > Issue Type: Bug > Environment: C* 2.1.0-rc5 with small clusters (one or two nodes) > Reporter: Fabrice Larcher > Attachments: result-failure.txt, result-success.txt > > > cSince 2.1.0-rc2, it appears that the secondary indexes are not always working. Immediately after the INSERT of a row, the index seems to be there. But after a while (I do not know when or why), SELECT statements based on any secondary index do not return the corresponding row(s) anymore. I noticed that a restart of C* may have an impact (the data inserted before the restart may be seen through the index, even if it was not returned before the restart). > Here is a use-case example (in order to clarify my request) : > {code} > CREATE TABLE IF NOT EXISTS ks.cf ( k int PRIMARY KEY, ind ascii, value text); > CREATE INDEX IF NOT EXISTS ks_cf_index ON ks.cf(ind); > INSERT INTO ks.cf (k, ind, value) VALUES (1, 'toto', 'Hello'); > SELECT * FROM ks.cf WHERE ind = 'toto'; // Returns no result after a while > {code} > The last SELECT statement may or may not return a row depending on the instant of the request. I experienced that with 2.1.0-rc5 through CQLSH with clusters of one and two nodes. Since it depends on the instant of the request, I am not able to deliver any way to reproduce that systematically (It appears to be linked with some scheduled job inside C*). -- This message was sent by Atlassian JIRA (v6.3.4#6332)