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 9A1DFD8B2 for ; Wed, 19 Dec 2012 16:07:31 +0000 (UTC) Received: (qmail 31418 invoked by uid 500); 19 Dec 2012 16:07:29 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 31383 invoked by uid 500); 19 Dec 2012 16:07:29 -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 31370 invoked by uid 99); 19 Dec 2012 16:07:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Dec 2012 16:07:28 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of vasileiosvlachos@gmail.com designates 74.125.82.50 as permitted sender) Received: from [74.125.82.50] (HELO mail-wg0-f50.google.com) (74.125.82.50) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Dec 2012 16:07:22 +0000 Received: by mail-wg0-f50.google.com with SMTP id es5so1036426wgb.5 for ; Wed, 19 Dec 2012 08:07:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=QY15cqGEzqYuqQz814bCU8ynByMxMbTPsi23u015WCI=; b=Q/9c3lv9cwduy6x/PSl0+ja3OoW1OjjgmqmFeEM/o8vRUV12C8xaCX3xzlVVlgzyW4 LfV/mUKmwcHJ7VfdIX4GzMcg0s5kB9NvNVpP6WPggmRuNGFzsOLhZpjLFWvP1VZdMFg+ 66TwLrUCCXoRqAmLfxNzyn4HTqJC3fkRPwMs+NGDMVF1/jm36rk5YTAnSYRRsITJH9+z 8U8/gA1vNuTR1vgD6B3gwYRb0KS/KjylYXwGpHa5tRz1hTJYlUclct8/HH8p9X0T9WR+ shLkXWC2Z7wIEZWLmCk8WWM1270U/qL5OaM0fKPRe7kntXfOmlohVoT8y5SGr4hmtUa4 V7Rw== MIME-Version: 1.0 Received: by 10.180.92.74 with SMTP id ck10mr12652215wib.9.1355933221167; Wed, 19 Dec 2012 08:07:01 -0800 (PST) Received: by 10.216.43.4 with HTTP; Wed, 19 Dec 2012 08:07:00 -0800 (PST) Date: Wed, 19 Dec 2012 16:07:00 +0000 Message-ID: Subject: Replication Factor and Consistency Level Confusion From: Vasileios Vlachos To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Hello All, We have a 3-node cluster and we created a keyspace (say Test_1) with Replication Factor set to 3. I know is not great but we wanted to test different behaviors. So, we created a Column Family (say cf_1) and we tried writing something with Consistency Level ANY, ONE, TWO, THREE, QUORUM and ALL. We did that while all nodes were in UP state, so we had no problems at all. No matter what the Consistency Level was, we were able to insert a value. Same cluster, different keyspace (say Test_2) with Replication Factor set to 2 this time and one of the 3 nodes deliberately DOWN. Again, we created a Column Family (say cf_1) and we tried writing something with different Consistency Levels. Here is what we got: ANY: worked (expected...) ONE: worked (expected...) TWO: did not work (WHAAAAT???) THREE: did not work (expected...) QUORUM: worked (expected...) ALL: did not work (expected I guess...) Now, we know that QUORUM derives from (RF/2)+1, so we were expecting that to work, after all only 1 node was DOWN. Why did Consistency Level TWO not work then??? Third test... Same cluster again, different keyspace (say Test_3) with Replication Factor set to 3 this time and 1 of the 3 nodes deliberately DOWN again. Same approach again, created different Column Family (say cf_1) and different Consistency Level settings resulted in the following: ANY: worked (whaaaaat???) ONE: worked (whaaaaat???) TWO: did not work (whaaaaat???) THREE: did not work (expected...) QUORUM: worked (whaaaaat???) ALL: worked (whaaaaat???) We thought that if the Replication Factor is greater than the number of nodes in the cluster, writes are blocked. Apparently we are completely missing the a level of understanding here, so we would appreciate any help! Thank you in advance! Vasilis