Return-Path: Delivered-To: apmail-incubator-cassandra-user-archive@minotaur.apache.org Received: (qmail 68723 invoked from network); 17 Feb 2010 01:18:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Feb 2010 01:18:04 -0000 Received: (qmail 87143 invoked by uid 500); 17 Feb 2010 01:18:03 -0000 Delivered-To: apmail-incubator-cassandra-user-archive@incubator.apache.org Received: (qmail 87127 invoked by uid 500); 17 Feb 2010 01:18:03 -0000 Mailing-List: contact cassandra-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cassandra-user@incubator.apache.org Delivered-To: mailing list cassandra-user@incubator.apache.org Received: (qmail 87118 invoked by uid 99); 17 Feb 2010 01:18:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Feb 2010 01:18:03 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jbellis@gmail.com designates 74.125.78.146 as permitted sender) Received: from [74.125.78.146] (HELO ey-out-1920.google.com) (74.125.78.146) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Feb 2010 01:17:55 +0000 Received: by ey-out-1920.google.com with SMTP id 26so1433143eyw.8 for ; Tue, 16 Feb 2010 17:17:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type; bh=DcT95RdtZ+ldpF5x8xrWreJS4ALeQHDkI4RxfYjEWOE=; b=DP7LP4ZWignCYdIFIhN2W1pcY46kyMUwseZhfOU6Iy1W+GlHmLIjp2U+gI9Loi+mEo HBp64RW/Ibf9IJsTwb4eQq2vZ22mqgDyTTSfZEhpnof9hCSLFi3ilOq+saENdESKhZfr H4yZ+Qoom4MZ2O31D7zMu+HUEC90kvknNJ+bg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=We5hJ4fs8Hr4vKhrCapCtFiH1PTHkp23mmkCpmL+TxPCoCcezaZKUU1BbGvIUr5pp/ lRdGtu2TeSYGA/nDP5kRDKUBBzgYwpdueL+zGN7dBm3Kzc5jq85dr3lJQBGzrCO6CbOq uvW64adCTgJkutgg4C4t1gCloFqC/va0RINfo= MIME-Version: 1.0 Received: by 10.216.87.83 with SMTP id x61mr2172763wee.7.1266369455236; Tue, 16 Feb 2010 17:17:35 -0800 (PST) In-Reply-To: References: From: Jonathan Ellis Date: Tue, 16 Feb 2010 19:17:15 -0600 Message-ID: Subject: Re: Testing row cache feature in trunk: write should put record in cache To: cassandra-user@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On Tue, Feb 16, 2010 at 7:11 PM, Weijun Li wrote: > Just started to play with the row cache feature in trunk: it seems to be > working fine so far except that for RowsCached parameter you need to specify > number of rows rather than a percentage (e.g., "20%" doesn't work). 20% works, but it's 20% of the rows at server startup. So on a fresh start that is zero. Maybe we should just get rid of the % feature... > The problem is: when you write to Cassandra it doesn't seem to put the new > keys in row cache (it is said to update instead invalidate if the entry is > already in cache). Is it easy to implement this feature? It's deliberately not done. For many (most?) workloads you don't want fresh writes blowing away your read cache. The code is in Table.apply: ColumnFamily cachedRow = cfs.getRawCachedRow(mutation.key()); if (cachedRow != null) cachedRow.addAll(columnFamily); I think it would be okay to have a WriteThrough option for what you're asking, though. -Jonathan