[Xapian-discuss] i get some error after cut power off

Olly Betts olly at survex.com
Fri Sep 11 03:49:51 BST 2009

On Fri, Sep 11, 2009 at 10:00:42AM +0800, ouwind wrote:
> my process have two threads, one for search , another for insert (
> using transaction ). when commit transaction, i cut power off.  then i
> boot computer, start the process, and it get error in one minute. so
> cut power off will get error?

Just saying you get an error isn't very informative.  Please quote the
exact error message when reporting problems.

Xapian tries hard to commit changes to disk in a way which is safe from
an unexpected power failure.  However, it can be thwarted by the
operating system and/or hardware - as the Linux manpage for fsync()

  If the underlying hard disk has write caching enabled, then the data
  may not really be on permanent storage when fsync() / fdatasync()

As of 1.0.14 (and 1.1.2), we use the F_FULLSYNC ioctl where available
(currently only on Mac OS X it seems), which should ensure the data is
actually on disk.  See ticket#288 for more info on this:



More information about the Xapian-discuss mailing list