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 BEFDC1004E for ; Sun, 8 Sep 2013 07:45:23 +0000 (UTC) Received: (qmail 63760 invoked by uid 500); 8 Sep 2013 07:45:20 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 63614 invoked by uid 500); 8 Sep 2013 07:45:20 -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 63605 invoked by uid 99); 8 Sep 2013 07:45:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Sep 2013 07:45:19 +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 (athena.apache.org: domain of petter.von.dolwitz@gmail.com designates 209.85.128.180 as permitted sender) Received: from [209.85.128.180] (HELO mail-ve0-f180.google.com) (209.85.128.180) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Sep 2013 07:45:15 +0000 Received: by mail-ve0-f180.google.com with SMTP id jz11so2592288veb.25 for ; Sun, 08 Sep 2013 00:44:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=T7QFJAn5axzf3iDWQn9edj1hMVCV8JooW/C/xE+h1ZU=; b=WrP71LchUsdvAegMr8tHxSKb5eTmZZXbfQTUObL6nwrZkXaGKo3Mu8t/Lsv5pp1+J7 q/+Xy+jNdDgJCzw0UTSE4Z8UY+zJOI8hGaYT8o2lxneLb6k3qu7J/DXZgP6pQDNA2/Dn YiNY9xX+3t6wfG8yvNVxxtNh8iOG50ORkaiOl44oTK/QeIb42/LAmnEPZgFCdGn6/fRT ceHEKYhXLMq6c5c7CZkZ7kAqjynE4ENsFps+1cXp/hCKU+TYbJCYYv4Wv6dha5myGWXL f5/spxmHytaRxH8AB/SLGFgN0bJfRo1QjBOJ81v7xGhFW+DLZQyKwTPGw+04uJrGNstV 3+dQ== MIME-Version: 1.0 X-Received: by 10.221.44.136 with SMTP id ug8mr11334128vcb.13.1378626294474; Sun, 08 Sep 2013 00:44:54 -0700 (PDT) Received: by 10.221.44.8 with HTTP; Sun, 8 Sep 2013 00:44:54 -0700 (PDT) In-Reply-To: References: Date: Sun, 8 Sep 2013 09:44:54 +0200 Message-ID: Subject: Re: Cannot get secondary indexes on fields in compound primary key to work (Cassandra 2.0.0) From: "Petter von Dolwitz (Hem)" To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=001a113378d88f6f9504e5da72f1 X-Virus-Checked: Checked by ClamAV on apache.org --001a113378d88f6f9504e5da72f1 Content-Type: text/plain; charset=ISO-8859-1 Thank you for you reply. I will look into this. I cannot not get my head around why the scenario I am describing does not work though. Should I report an issue around this or is this expected behaviour? A similar setup is described on this blog post by the development lead. http://www.datastax.com/dev/blog/cql3-for-cassandra-experts 2013/9/6 Robert Coli > On Fri, Sep 6, 2013 at 6:18 AM, Petter von Dolwitz (Hem) < > petter.von.dolwitz@gmail.com> wrote: > >> I am struggling with getting secondary indexes to work. I have created >> secondary indexes on some fields that are part of the compound primary key >> but only one of the indexes seems to work (the one set on the field 'e' on >> the table definition below). Using any other secondary index in a where >> clause causes the message "Request did not complete within rpc_timeout.". >> It seems like if a put a value in the where clause that does not exist in a >> column with secondary index then cassandra quickly return with the result >> (0 rows) but if a put in a value that do exist I get a timeout. There is no >> exception in the logs in connection with this. I've tried to increase the >> timeout to a minute but it does not help. >> > > In general unless you absolutely need the atomicity of the update of a > secondary index with the underlying storage row, you are better off making > a manual secondary index column family. > > =Rob > --001a113378d88f6f9504e5da72f1 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Thank you for you reply.

I will look in= to this. I cannot not get my head around why the scenario I am describing d= oes not work though. Should I report an issue around this or is this expect= ed behaviour? A similar setup is described on this blog post by the develop= ment lead.





2013/9/6 Robert Coli <rcoli@eventbrite.com>
On Fri, Sep 6, 2013 at 6:18 AM, Petter v= on Dolwitz (Hem) <petter.von.dolwitz@gmail.com> w= rote:
I am struggling with getting secondary indexes to work. I have created seco= ndary indexes on some fields that are part of the compound primary key but = only one of the indexes seems to work (the one set on the field 'e'= on the table definition below). Using any other secondary index in a where= clause causes the message "Request did not complete within rpc_timeou= t.". It seems like if a put a value in the where clause that does not = exist in a column with secondary index then cassandra quickly return with t= he result (0 rows) but if a put in a value that do exist I get a timeout. T= here is no exception in the logs in connection with this. I've tried to= increase the timeout to a minute but it does not help.

In general unless you ab= solutely need the atomicity of the update of a secondary index with the und= erlying storage row, you are better off making a manual secondary index col= umn family.

=3DRob=A0

--001a113378d88f6f9504e5da72f1--