cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Cassandra Wiki] Update of "ArchitectureInternals" by JingguoYao
Date Wed, 23 Mar 2011 10:50:07 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Cassandra Wiki" for change notification.

The "ArchitectureInternals" page has been changed by JingguoYao.
The comment on this change is: Disable wiki links.
http://wiki.apache.org/cassandra/ArchitectureInternals?action=diff&rev1=19&rev2=20

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

   * When a Memtable is full, it gets sorted and written out as an SSTable asynchronously
by !ColumnFamilyStore.switchMemtable
     * When enough SSTables exist, they are merged by !CompactionManager.doCompaction
       * Making this concurrency-safe without blocking writes or reads while we remove the
old SSTables from the list and add the new one is tricky, because naive approaches require
waiting for all readers of the old sstables to finish before deleting them (since we can't
know if they have actually started opening the file yet; if they have not and we delete the
file first, they will error out).  The approach we have settled on is to not actually delete
old SSTables synchronously; instead we register a phantom reference with the garbage collector,
so when no references to the SSTable exist it will be deleted.  (We also write a compaction
marker to the file system so if the server is restarted before that happens, we clean out
the old SSTables at startup time.)
-      * A "major" compaction of merging _all_ sstables may be manually initiated by the user;
this results in submitMajor calling doCompaction with all the sstables in the ColumnFamily,
rather than just sstables of similar size.
+      * A "major" compaction of merging _all_ sstables may be manually initiated by the user;
this results in submitMajor calling doCompaction with all the sstables in the !ColumnFamily,
rather than just sstables of similar size.
   * See [[ArchitectureSSTable]] and ArchitectureCommitLog for more details
  
  = Read path =

Mime
View raw message