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 673B917E50 for ; Mon, 8 Feb 2016 09:15:40 +0000 (UTC) Received: (qmail 2598 invoked by uid 500); 8 Feb 2016 09:15:40 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 2555 invoked by uid 500); 8 Feb 2016 09:15:40 -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 2536 invoked by uid 99); 8 Feb 2016 09:15:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Feb 2016 09:15:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 0231B2C1F58 for ; Mon, 8 Feb 2016 09:15:40 +0000 (UTC) Date: Mon, 8 Feb 2016 09:15:40 +0000 (UTC) From: "Pavel Yaskevich (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-11133) [SASI Pre-QA] Creating SPARSE index with Analyzer fails silently when using = 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-11133?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pavel Yaskevich updated CASSANDRA-11133: ---------------------------------------- Issue Type: Sub-task (was: Bug) Parent: CASSANDRA-11136 > [SASI Pre-QA] Creating SPARSE index with Analyzer fails silently when using = > ----------------------------------------------------------------------------- > > Key: CASSANDRA-11133 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11133 > Project: Cassandra > Issue Type: Sub-task > Components: CQL > Environment: Tested from build [CASSANDRA-11067|https://issues.apache.org/jira/browse/CASSANDRA-11067] > Reporter: DOAN DuyHai > Assignee: Pavel Yaskevich > Fix For: 3.4 > > > Tested from build [CASSANDRA-11067|https://issues.apache.org/jira/browse/CASSANDRA-11067] > {code:sql} > CREATE KEYSPACE music WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'} AND durable_writes = true; > CREATE TABLE music.albums ( > id int PRIMARY KEY, > artist text, > title text, > year int > ); > INSERT INTO music.albums(id, artist, title, year) > VALUES (1, 'Bullets and Octane', 'In the Mouth of the Young', 2006); > INSERT INTO music.albums(id, artist, title, year) > VALUES (2, 'Quantic', 'Look Around The Corner', 2012); > INSERT INTO music.albums(id, artist, title, year) > VALUES (3, 'America', 'View From the Ground', 1982); > CREATE CUSTOM INDEX ON music.albums (year) USING 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = {'mode': 'SPARSE', 'analyzer_class': 'org.apache.cassandra.index.sasi.analyzer.NonTokenizingAnalyzer'}; > SELECT artist,title,year FROM music.albums; > artist | title | year > -------------------+----------------------------+------ > Bullets and Octane | In the Mouth of the Young | 2006 > Quantic | Look Around the Corner | 2012 > America | View From the Ground | 1982 > {code} > The index was properly created. It can be found calling *DESCRIBE TABLE albums;* as well as in *system_schema.indexes*. > Strangely, the index does not return any data: > {code:sql} > SELECT * FROM music.albums WHERE year=2006; > (0 rows) > {code} > However range query using the index fails with a cryptic exception: > {code:sql} > SELECT * FROM music.albums WHERE year>=1981 AND year<=1990 LIMIT 10; > Traceback (most recent call last): > File "/opt/apps/apache-cassandra-3.4/bin/cqlsh.py", line 1250, in perform_simple_statement > result = future.result() > File "/opt/apps/apache-cassandra-3.4/bin/../lib/cassandra-driver-internal-only-3.0.0-6af642d.zip/cassandra-driver-3.0.0-6af642d/cassandra/cluster.py", line 3122, in result > raise self._final_exception > ReadFailure: code=1300 [Replica(s) failed to execute read] message="Operation failed - received 0 responses and 1 failures" info={'failures': 1, 'received_responses': 0, 'required_responses': 1, 'consistency': 'ONE'} > {code} > The real exception message in _/var/log/cassandra/system.log_ is: > {code} > Caused by: java.lang.IllegalArgumentException: null > at org.apache.cassandra.index.sasi.memory.SkipListMemIndex.search(SkipListMemIndex.java:75) ~[main/:na] > at org.apache.cassandra.index.sasi.memory.IndexMemtable.search(IndexMemtable.java:69) ~[main/:na] > at org.apache.cassandra.index.sasi.conf.ColumnIndex.searchMemtable(ColumnIndex.java:107) ~[main/:na] > at org.apache.cassandra.index.sasi.TermIterator.build(TermIterator.java:87) ~[main/:na] > at org.apache.cassandra.index.sasi.plan.QueryController.getIndexes(QueryController.java:146) ~[main/:na] > at org.apache.cassandra.index.sasi.plan.Operation$Builder.complete(Operation.java:423) ~[main/:na] > at org.apache.cassandra.index.sasi.plan.QueryPlan.analyze(QueryPlan.java:57) ~[main/:na] > at org.apache.cassandra.index.sasi.plan.QueryPlan.execute(QueryPlan.java:68) ~[main/:na] > at org.apache.cassandra.index.sasi.SASIIndex.lambda$searcherFor$241(SASIIndex.java:256) ~[main/:na] > at org.apache.cassandra.index.sasi.SASIIndex$$Lambda$248/1287847768.search(Unknown Source) ~[na:na] > at org.apache.cassandra.db.ReadCommand.executeLocally(ReadCommand.java:354) ~[main/:na] > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)