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 176CD757B for ; Thu, 28 Jul 2011 11:56:33 +0000 (UTC) Received: (qmail 38041 invoked by uid 500); 28 Jul 2011 11:56:30 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 37773 invoked by uid 500); 28 Jul 2011 11:56:24 -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 37729 invoked by uid 99); 28 Jul 2011 11:56:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jul 2011 11:56:22 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dnallsopp@gmail.com designates 74.125.82.44 as permitted sender) Received: from [74.125.82.44] (HELO mail-ww0-f44.google.com) (74.125.82.44) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jul 2011 11:56:15 +0000 Received: by wwe5 with SMTP id 5so1924539wwe.25 for ; Thu, 28 Jul 2011 04:55:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=S0yiP3rFvQMCwmain+0S8f2qdxfOCcV+HiU5LAPE5zI=; b=ozlADUXeOc9ITADkFyK3NVWyF05dJ3pbEQinuSrkrZkhFP14B/Te/MR7V8byMrRwtH 3uzMUMZGvec2J5uLpr308nDXc+iUWROgIzi/DRvTEaMEH3GuqMJBB8ncYae3DgqeYAet iKjLFzhoZHququybP7cZ4mXMUvPLIBchskWBs= MIME-Version: 1.0 Received: by 10.227.151.196 with SMTP id d4mr7742833wbw.102.1311854154258; Thu, 28 Jul 2011 04:55:54 -0700 (PDT) Received: by 10.216.168.209 with HTTP; Thu, 28 Jul 2011 04:55:54 -0700 (PDT) Date: Thu, 28 Jul 2011 12:55:54 +0100 Message-ID: Subject: NotFoundException thrown for get(), but not get_slice() with a column_names predicate From: David Allsopp To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=0016e64c1f74dc998904a91fd8a4 --0016e64c1f74dc998904a91fd8a4 Content-Type: text/plain; charset=ISO-8859-1 If I try to retrieve a column that is not present, using get(), then I'll get a NotFoundException. If (for efficiency's sake) I try to retrieve several named columns using get_slice, with a column_names predicate (i.e. a list of columns) then I won't get the exception if one of those columns is missing, I think? This seems inconsistent - would it make sense for get_slice to throw the exception too, or perhaps have an option to require all columns to be present? The reason this came up is that I write and read with CL.ONE, and retry at the client side in case of (very occasional) failures, with the aim of improving availability and performance by avoiding CL.QUORUM etc. This is easy in the get() case - I can just retry a few times if I get a NotFoundException. I normally only need to retry once, in less than 0.1% of cases. For the get_slice case I'd need to retrieve all the columns again (might be wasteful) or check which ones were returned and form a new request (seems overly complex) or give up using get_slice and just use individual get() calls (seems inefficient). See also https://issues.apache.org/jira/browse/CASSANDRA-518 Thanks, David. --0016e64c1f74dc998904a91fd8a4 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable If I try to retrieve a column that is not present, using get(), then I'= ll get a NotFoundException.

If (for efficiency's sake) I try to = retrieve several named columns using get_slice, with a column_names predica= te (i.e. a list of columns) then I won't get the exception if one of th= ose columns is missing, I think?

This seems inconsistent - would it make sense for get_slice to throw th= e exception too, or perhaps have an option to require all columns to be pre= sent?


The reason this came up is that I write and read with CL.O= NE, and retry at the client side in case of (very occasional) failures, wit= h the aim of improving availability and performance by avoiding CL.QUORUM e= tc.
This is easy in the get() case - I can just retry a few times if I get a No= tFoundException. I normally only need to retry once, in less than 0.1% of c= ases.

For the get_slice case I'd need to retrieve all the column= s again (might be wasteful) or check which ones were returned and form a ne= w request (seems overly complex) or give up using get_slice and just use in= dividual get() calls (seems inefficient).

See also https://issues.apache.org/jira/browse/CASSANDRA-518

Thanks,
David.
--0016e64c1f74dc998904a91fd8a4--