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 33EAEDE55 for ; Tue, 17 Jul 2012 15:44:53 +0000 (UTC) Received: (qmail 19054 invoked by uid 500); 17 Jul 2012 15:44:50 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 18851 invoked by uid 500); 17 Jul 2012 15:44:50 -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 18822 invoked by uid 99); 17 Jul 2012 15:44:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jul 2012 15:44:49 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sylvain@datastax.com designates 209.85.216.172 as permitted sender) Received: from [209.85.216.172] (HELO mail-qc0-f172.google.com) (209.85.216.172) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jul 2012 15:44:42 +0000 Received: by qcac10 with SMTP id c10so392935qca.31 for ; Tue, 17 Jul 2012 08:44:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=WooVcWBs3O8F1QIw/bBYbiUXoiflYWbp0ZdnWJYOXg4=; b=EUtZHDtnRVAeaVwk6QK0kdd4UcISU1oUc3oqLV4jDhF8ORXSoCUtR2eFbjxFgEQJef YUoa7eqVSRiX8Lmc3RD+48AIQPmwCJXtW6KoifyXG46kkywnhcrrRh3tOnlW5k4sA6U6 4YhE/lzF1cWtFPHSxv9wyWf0d7dv9WPaFi4aS+R8jnwh4Aj6zKf/eXAGFGzv2U7yF7/o XVHFPGIiI247n1fHkRkUCDZATxHZnGk0adBs1i7r3kHNdGwe1zHQhSMNydiaZS9hdUE4 olgwAiJKDFnr7n6Gg5/QNVsdl85gKksORpqL6LD4PFLcNeh+s3QcS5WUMcp/cOctoUZ3 RlZg== MIME-Version: 1.0 Received: by 10.224.98.74 with SMTP id p10mr5776950qan.8.1342539861146; Tue, 17 Jul 2012 08:44:21 -0700 (PDT) Received: by 10.229.73.146 with HTTP; Tue, 17 Jul 2012 08:44:21 -0700 (PDT) In-Reply-To: References: Date: Tue, 17 Jul 2012 17:44:21 +0200 Message-ID: Subject: Re: What does "Replicate on write" mean? From: Sylvain Lebresne To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQnPrqoyMmPAHakRSY814j86FF3kxIvVVlBleNP0o2Lm0MKQbph+PjEnHyzNVhEQ2Cg2tHlk On Tue, Jul 17, 2012 at 5:05 PM, Jason Tang wrote: > I check the schema, and found the parameter "Replicate on write: false", > what does this parameter mean. First, that parameter only affects counter increments, it has no impact whatsoever on normal writes. For counters, if set to false as in your case, it means that counter increments are written to only one replica, whatever the replication factor is. The (bad) justification for this even existing is that counters, by their design and contrarily to normal writes, imply a read during a write, and that option avoid that read. *However*, that option is very dangerous as it make it very very easy to lose data (that is, it is *worst* that RF=1 and as such is not appropriate even if RF=1). The reason it still exists is that some people that are very intimate with the counter implementation and know what they are doing (at least I hope for them they do) asked that we keep it. So overall my personal advise is 'Do not ever set replicate_on_write to false' (it is set to true by default unless you are using a very old C* version, in which case having it to false was a bug). But to sum it up, it's only for counters and even then, if set to false, only CL=ONE is allowed. -- Sylvain