Return-Path: Delivered-To: apmail-incubator-cassandra-commits-archive@minotaur.apache.org Received: (qmail 27689 invoked from network); 1 Mar 2010 07:17:28 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Mar 2010 07:17:28 -0000 Received: (qmail 39870 invoked by uid 500); 28 Feb 2010 20:10:49 -0000 Delivered-To: apmail-incubator-cassandra-commits-archive@incubator.apache.org Received: (qmail 39858 invoked by uid 500); 28 Feb 2010 20:10:49 -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 39850 invoked by uid 99); 28 Feb 2010 20:10:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 28 Feb 2010 20:10:49 +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; Sun, 28 Feb 2010 20:10:47 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id CCA2516E21; Sun, 28 Feb 2010 20:10:26 +0000 (GMT) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Apache Wiki To: Apache Wiki Date: Sun, 28 Feb 2010 20:10:26 -0000 Message-ID: <20100228201026.29618.45150@eos.apache.org> Subject: =?utf-8?q?=5BCassandra_Wiki=5D_Update_of_=22ArchitectureCommitLog=22_by_J?= =?utf-8?q?onathanEllis?= 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 "ArchitectureCommitLog" page has been changed by JonathanEllis. The comment on this change is: explain RowMutation and CLContext roles. http://wiki.apache.org/cassandra/ArchitectureCommitLog?action=3Ddiff&rev1= =3D3&rev2=3D4 -------------------------------------------------- - Each !CommitLog has a !CommitLogHeader. A !CommitLogHeader has one entry = per !ColumnFamily. Each entry has a dirty bit and a replay offset, indicati= ng the position in the !CommitLog file to start replaying the log for a par= ticular !ColumnFamily. + The !CommitLog class manages the !CommitLogSegments, each of which corres= ponds to a file on disk containing a fixed-size !CommitLogHeader followed b= y serialized !RowMutation objects. + = + A !CommitLogHeader has one entry per !ColumnFamily, consisting of a dirty= bit and a replay offset, indicating the position in the !CommitLog file to= start replaying the log for a particular !ColumnFamily. = Each insertion (deletion) has to first write a log entry to the !CommitLo= g. = * The writing of all log entries is handled by a single thread in !Commi= tLogExecutorService. + * For the first insert to a given !ColumnFamily CF in each !CommitLogSeg= ment, the !CommitLogHeader is updated: the CF's dirty bit is turned on and = the replay offset for CF in the !CommitLogHeader is updated with the curren= t position (represented by a !CommitLogContext object) in the CommitLog fil= e. + * A !RowMutation entry is then appended to the !CommitLogSegment - * For each insert, the !CommitLogHeader is first updated, if necessary. - * For each !ColumnFamily CF to be inserted, if the dirty bit for CF in = the !CommitLogHeader is off, the dirty bit is turned on and the replay offs= et for CF in the !CommitLogHeader is updated with the current position in t= he CommitLog file. - * A log entry is then added to the tail of the !CommitLog file. - * If !CommitLogSync is set to batch, the insertion further waits until t= he !CommitLog file is sync-ed to disk before the insert is allowed to proce= ed + * If !CommitLogSync is set to batch, the insertion further waits until t= he !CommitLogSegment is sync-ed to disk before the insert is allowed to pro= ceed - * Once a !CommitLog file (!CommitLogSegment) becomes too large, a new se= gment is created and new operations are appended there instead. + * Once a !CommitLogSegment becomes too large, a new segment is created a= nd new operations are appended there instead. = - On the completion of a flush for a !ColumnFamily, + On the completion of a flush for a !ColumnFamily CF, = * For each !CommitLogSegment F generated when or before the flush is ini= tiated, * If F is not the one being used when the flush was initated, the dirty= bit for CF in the !CommitLogHeader of F is turned off