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=diff&rev1=3&rev2=4

--------------------------------------------------

- Each !CommitLog has a !CommitLogHeader. A !CommitLogHeader has one entry per 
!ColumnFamily. Each entry has a dirty bit and a replay offset, indicating the 
position in the !CommitLog file to start replaying the log for a particular 
!ColumnFamily.
+ The !CommitLog class manages the !CommitLogSegments, each of which 
corresponds to a file on disk containing a fixed-size !CommitLogHeader followed 
by 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 !CommitLog.
  
   * The writing of all log entries is handled by a single thread in 
!CommitLogExecutorService.
+  * For the first insert to a given !ColumnFamily CF in each 
!CommitLogSegment, 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 current position (represented by a !CommitLogContext object) in the 
CommitLog file.
+  * 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 offset for 
CF in the !CommitLogHeader is updated with the current position in the 
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 the 
!CommitLog file is sync-ed to disk before the insert is allowed to proceed
+  * If !CommitLogSync is set to batch, the insertion further waits until the 
!CommitLogSegment is sync-ed to disk before the insert is allowed to proceed
-  * Once a !CommitLog file (!CommitLogSegment) becomes too large, a new 
segment is created and new operations are appended there instead.
+  * Once a !CommitLogSegment becomes too large, a new segment is created and 
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 
initiated,
    * 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

Reply via email to