[Xapian-discuss] Questions about the "Atomic modifications" of xapian

Olly Betts olly at survex.com
Thu Nov 12 23:06:43 GMT 2009


On Thu, Nov 12, 2009 at 06:03:38PM +0800, ????????? wrote:
>     """
>     If the system is interrupted during a modification, the database should
> always be left in a valid state. This applies even if the power is cut
> unexpectedly, as long as the disk does not become corrupted due to hardware
> failure.
>     """
> 
>     I want to know how xapian could guarantee this. I cannot found answer on
> the web.

The B-tree manager supports versioning, so updates are made to a new version of
the tree which isn't made "current" until we want to commit it.

See http://xapian.org/docs/internals.html for some more information, and the
source code in backends/flint (or backends/chert for trunk, though it is pretty
similar in this regard) for the gory details.

Cheers,
    Olly



More information about the Xapian-discuss mailing list