Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 70605 invoked from network); 18 Aug 2010 03:52:57 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 18 Aug 2010 03:52:57 -0000 Received: (qmail 68835 invoked by uid 500); 18 Aug 2010 03:52:55 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 68522 invoked by uid 500); 18 Aug 2010 03:52:52 -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 68514 invoked by uid 99); 18 Aug 2010 03:52:51 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Aug 2010 03:52:51 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of chen.daqi@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; Wed, 18 Aug 2010 03:52:28 +0000 Received: by wwi17 with SMTP id 17so180199wwi.25 for ; Tue, 17 Aug 2010 20:52:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=jpBlEZVi3PwmlIP+ruEV9JUeXR7e72GGUa0M18XildU=; b=Z260EC8Ivl05NodwgckL0EoVLQK4bXEaCv2p8IsuXq+wIfd5KNL1xiA4wVPLPsScMa 6TIGGmulX4zOlRJjguQ0acF2y6thx3hKj7rRYxZoAE7oE5s1RqxSYbFr+Hxraz8uTfeO TdruKB5z9dlsHjpdtdLcoViiaA15v+nH6OGKQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=FzWl8rl/UMFhxTTO9rFuC2CQbHYdkDanobF5UgrKeWuJyeDZWG5srIvZ3NqFIEADwP a2zY5HD9nohFTJedgPF+jJB34xOyUPyjX1Rk6x+FHekfn6ZRlRn9Z4buIVyHtCeuIzOI vnCEj7yc3QPz386rmZRR/QRZH+IOzGxEI3jAU= MIME-Version: 1.0 Received: by 10.227.135.141 with SMTP id n13mr6673618wbt.97.1282103527857; Tue, 17 Aug 2010 20:52:07 -0700 (PDT) Received: by 10.227.139.227 with HTTP; Tue, 17 Aug 2010 20:52:07 -0700 (PDT) In-Reply-To: References: Date: Wed, 18 Aug 2010 11:52:07 +0800 Message-ID: Subject: Re: cassandra for a inbox search with high reading qps From: Chen Xinli To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=0016e65b5e3457e0c8048e10fd88 X-Virus-Checked: Checked by ClamAV on apache.org --0016e65b5e3457e0c8048e10fd88 Content-Type: text/plain; charset=ISO-8859-1 I'm using cassandra 0.6.4; there's a configuration option DoConsistencyChecksBoolean in storage-conf.xml. Is't that for read-repair ? I will do a test for WRITE QUORUM, READ.ONE if it can meet our requirements. 2010/8/18 Edward Capriolo > On Tue, Aug 17, 2010 at 10:55 PM, Chen Xinli wrote: > > Hi, > > > > We are going to use cassandra for searching purpose like inbox search. > > The reading qps is very high, we'd like to use ConsitencyLevel.One for > > reading and disable read-repair at the same time. > > > > For reading consistency in this condition, the writing should use > > ConsistencyLevel.ALL. But the writing will fail if one node fails. > > We want such a ConsistencyLevel for writing/reading that : > > 1. writing will success if there is node alive for this key > > 2. reading will not forward to a node that's just recovered and doing > hinted > > handoff > > > > So that, if some node fails, others nodes for replica will receive the > data > > and surve reading successfully; > > when the failure node recovers, it will receive hinted handoff from > other > > nodes and it'll not surve reading until hinted handoff is done. > > > > Does cassandra support the cases already? or should I modify the code to > > meet our requirements? > > > > Thanks for any advices! > > > > -- > > Best Regards, > > Chen Xinli > > > > >>The reading qps is very high, we'd like to use ConsitencyLevel.One for > reading and disable read-repair at the same time. > You can not disable read repair, all reads no matter the > ConsistencyLevel always repair. The CL only controls how many nodes to > read from before returning data to the client. > > These two statements contradict. > > For reading consistency in this condition, the writing should use > ConsistencyLevel.ALL. But the writing will fail if one node fails. > > 1. writing will success if there is node alive for this key > > Also regardless of the write ConsistencyLevel all writes are written > to all nodes. If a target node is down HintedHandoff will queue the > write up for when the node restarts * in (6.3 you can turn off Hinted > Handoff) > > You may want to WRITE QUORUM, READ.ONE, with RF=3 you would need two > failed nodes before seeing an UnavailableException. You still have > pretty strong consistency (depending how you look at it) and fast > reads. > > Check the IRC logs Ben "schooled" me over this a couple of days ago. > -- Best Regards, Chen Xinli --0016e65b5e3457e0c8048e10fd88 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I'm using cassandra 0.6.4; there's a configuration option DoConsist= encyChecksBoolean in storage-conf.xml.
Is't that for read-repair ?
I will do a test for WRITE QUORUM, READ.ONE if it can meet our requir= ements.

2010/8/18 Edward Capriolo = <edlinuxguru@gmail.com><= /span>
On Tue, Aug 17, 2010 at 10:55 PM, Chen Xi= nli <chen.daqi@gmail.com> = wrote:
> Hi,
>
> We are going to use cassandra for searching purpose like inbox search.=
> The reading qps is very high, we'd like to use ConsitencyLevel.One= for
> reading and disable read-repair at the same time.
>
> For reading consistency in this condition, the writing should use
> ConsistencyLevel.ALL. But the writing will fail if one node fails.
> We want such a ConsistencyLevel for writing/reading that :
> 1. writing will success if there is node alive for this key
> 2. reading will not forward to a node that's just recovered and do= ing hinted
> handoff
>
> So that, if some node fails, others nodes for replica will receive the= data
> and surve reading successfully;
> when the failure node recovers,=A0 it will receive hinted handoff from= other
> nodes and it'll not surve reading until hinted handoff is done. >
> Does cassandra support the cases already? or should I modify the code = to
> meet our requirements?
>
> Thanks for any advices!
>
> --
> Best Regards,
> Chen Xinli
>

>>The reading qps is very high, we'd like to use ConsitencyLevel.= One for reading and disable read-repair at the same time.
You can not disable read repair, all reads no matter the
ConsistencyLevel always repair. The CL only controls how many nodes to
read from before returning data to the client.

These two statements contradict.
> For reading consistency in this condition, the writi= ng should use ConsistencyLevel.ALL. But the writing will fail if one node f= ails.
> 1. writing will success if there is node alive= for this key

Also regardless of the write ConsistencyLevel all writes are written<= br> to all nodes. If a target node is down HintedHandoff will queue the
write up for when the node restarts * in (6.3 you can turn off Hinted
Handoff)

You may want to WRITE QUORUM, READ.ONE, with RF=3D3 you would need two
failed nodes before seeing an UnavailableException. You still have
pretty strong consistency (depending how you look at it) and fast
reads.

Check the IRC logs Ben "schooled" me over this a couple of days a= go.



--
Best Regards,
Chen X= inli
--0016e65b5e3457e0c8048e10fd88--