couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Update of "Durability Matrix" by RobertNewson
Date Thu, 17 Sep 2009 13:20:51 GMT
Dear Wiki user,

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

The following page has been changed by RobertNewson:
http://wiki.apache.org/couchdb/Durability_Matrix

------------------------------------------------------------------------------
  
  CouchDB uses a strictly append-only pattern when writing documents and attachments to the
database file. In order to ensure database integrity, a footer is also included which contains,
among other things, the location of the current root of the various B+Tree's that CouchDB
uses internally. The order of writes is as follows;
  
-  # file:sync()
+  1. file:sync()
-  # append two copies of the header
+  1. append two copies of the header
-  # file:sync()
+  1. file:sync()
  
  The appending of the header is bookended by sync() calls in order to ensure correct ordering
of writes even through failure scenarios. Because of the two copies of the header, and the
strong checksum on each, no failing write can corrupt the database. At worst, the database
reflects the previous state. 
  

Mime
View raw message