[Xapian-devel] Re: [Xapian-commits] 8157: trunk/xapian-core/ trunk/xapian-core/backends/flint/ trunk/xapian-core/backends/quartz/

Olly Betts olly at survex.com
Mon Apr 9 15:49:27 BST 2007


On Mon, Apr 09, 2007 at 03:37:44PM +0100, Richard Boulton wrote:
> olly wrote:
> >backends/flint/flint_database.cc: Delete the corresponding entry
> >(if any) from doclens in delete_document().  Add assertion to
> >add_document_() that the corresponding entry in doclens isn't
> >already set, but in a non-debug build overwrite any existing
> >entry as that's more likely to be correct.
> >backends/quartz/quartz_database.cc: Ditto.

Incidentally, it wasn't clear to me if it was a good idea to leave a
dangling doclens entry in this case (as a "save effort" optimisation)
and just overwrite any existing entry in add_document_() - I worried
a little that such dead entries might confuse code elsewhere.

Ultimately this code will get replaced anyway as we can cache changes
more efficiently than we currently do, so I just took the "obviously
correct" approach.

> This fixes an assertion error I was seeing with remote database with 
> replacedoc4 with builds with assertions turned on.  All tests now pass 
> for me in both debug and non-debug builds (and it looks like remote 
> databases now support essentially all methods that local databases do, yay!)

Marvellous!  I've closed bug#38 now.

Cheers,
    Olly



More information about the Xapian-devel mailing list