Return-Path: Delivered-To: apmail-incubator-cassandra-commits-archive@minotaur.apache.org Received: (qmail 70964 invoked from network); 25 Aug 2009 00:14:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Aug 2009 00:14:58 -0000 Received: (qmail 72256 invoked by uid 500); 25 Aug 2009 00:15:23 -0000 Delivered-To: apmail-incubator-cassandra-commits-archive@incubator.apache.org Received: (qmail 72220 invoked by uid 500); 25 Aug 2009 00:15:23 -0000 Mailing-List: contact cassandra-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cassandra-dev@incubator.apache.org Delivered-To: mailing list cassandra-commits@incubator.apache.org Received: (qmail 72210 invoked by uid 99); 25 Aug 2009 00:15:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Aug 2009 00:15:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.130] (HELO eos.apache.org) (140.211.11.130) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Aug 2009 00:15:21 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 8FACA112AB for ; Tue, 25 Aug 2009 00:15:01 +0000 (GMT) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Apache Wiki To: cassandra-commits@incubator.apache.org Date: Tue, 25 Aug 2009 00:15:01 -0000 Message-ID: <20090825001501.6377.18936@eos.apache.org> Subject: [Cassandra Wiki] Update of "API" by JoeStump X-Virus-Checked: Checked by ClamAV on apache.org Dear Wiki user, You have subscribed to a wiki page or wiki category on "Cassandra Wiki" for change notification. The following page has been changed by JoeStump: http://wiki.apache.org/cassandra/API The comment on the change is: Added notes on ConsistencyLevel. ------------------------------------------------------------------------------ UnavailableException:: Not all the replicas required could be created and/or read. TApplicationException:: Internal server error. + == Structures == + + === ConsistencyLevel === + + The `ConsistencyLevel` is an `enum` that controls both read and write behavior based on `` in your `storage-conf.xml`. The different consistency levels have different meanings, depending on if you're doing a write or read operation. + + ==== Write ==== + + ||'''Level'''||'''Behavior'''|| + ||`ZERO`||Only ensure that the write has been written to the commit log.|| + ||`ONE`||Ensure that the write has been written to at least 1 node's commit log and memory table.|| + ||`QUORUM`||Ensure that the write has been written to ` / 2 + 1` nodes.|| + ||`ALL`||Ensure that the write is written to `` nodes.|| + + ==== Read ==== + + ||'''Level'''||'''Behavior'''|| + ||`ZERO`||Not supported.|| + ||`ONE`||Will return the record returned by the first node to respond. A background thread is always fired off to fix any consistency issues when `ConsistencyLevel.ONE` is used. This means subsequent calls will have correct data while the initial read may not.|| + ||`QUORUM`||Will query all storage nodes and return the record that is prevailing in consistency. For instance, if `foo = 1` on nodes A and B, while `foo = 2` on node C then the prevailing consistency is `foo = 1`. A background thread will be fired off to fix consistency issues.|| + ||`ALL`||Not supported.|| +