[Xapian-discuss] flush problem
olly at survex.com
Tue Jan 22 00:34:21 GMT 2008
On Sun, Jan 20, 2008 at 01:32:19PM -0500, Michael A. Lewis wrote:
> I am having a problem with flushing a database. I am adding N records
> to the DB (which amounts to 1 - 2000). At then end of the run, I issue
> a flush() call. The problem is that the flush call never seems to do
> anything. Every 10000 additions to the database and the library
> performs a flush (which can take up to 3 hours on a 560,000 document
> database) as if my flush call was never performed.
What result do you get if you open a separate Xapian::Database on the
database you are writing to just after calling flush() explicitly, and
If this doesn't change until 10000 documents have been indexed,
something is wrong with WritableDatabase::flush() (though the code looks
correct to me too, and I'm sure we have testcases for this).
If it is changing, something odd still seems to be happening, but it's
not that flush() is just ignored.
An explicit flush() should also reset the counter for the automatic
More information about the Xapian-discuss