Ticket #287 (closed defect: fixed)

Opened 4 months ago

Last modified 3 months ago

DatabaseCorruptError after deleting all postings for a term

Reported by: flav Owned by: olly
Priority: normal Milestone: 1.0.8
Component: Backend-Flint Version: 1.0.5
Severity: normal Keywords:
Cc: Blocked By:
Operating System: Linux Blocking:

Description

Problem: Getting a DatabaseCorruptError? after doing multiple delete_document() via php bindings.

I reduced working code (attached) to a contrived example which shows errors with a xapian-check.

Versions:

Errors with:

Ubuntu Hardy 8.04.1 libxapian15 1.0.5 (Ubuntu current package) php5 5.2.4 (Ubuntu current package)

-- Did a manual install of 1.0.7 and have same problem.

Works fine under:

Ubuntu Gutsy 7.10 libxapian15 1.0.2 (Ubuntu current package) php5 5.2.3 (Ubuntu current package)

Not sure if a distribution specific problem, however, did do an install from source (1.0.7) with same results.

Attachments

xapian_standalone_test.php (2.8 kB) - added by flav 4 months ago.
Test file to reproduce error.
xapian-bug287-testcase.patch (1.1 kB) - added by olly 4 months ago.
Crude patch against trunk's api_wrdb.cc which shows the problem
flint-cursor-del.patch (0.9 kB) - added by olly 4 months ago.
Patch which should fix this for flint

Change History

Changed 4 months ago by flav

Test file to reproduce error.

Changed 4 months ago by olly

  • status changed from new to assigned
  • version set to 1.0.5
  • milestone set to 1.0.8

I can reproduce this, and am investigating.

The fact it works with 1.0.2 may just be that the bug doesn't happen to manifest there (since you say it's sensitive to changes in the data, which doesn't surprise me).

Changed 4 months ago by olly

  • keywords DatabaseCorruptError php removed
  • component changed from Other to Backend-Flint
  • summary changed from DatabaseCorruptError in PHP bindings when using prefixed terms and delete_document to DatabaseCorruptError after deleting all documents.

I have a C++ reproducer.

Changed 4 months ago by olly

Crude patch against trunk's api_wrdb.cc which shows the problem

Changed 4 months ago by olly

Patch which should fix this for flint

Changed 4 months ago by olly

Fixed in trunk (r11048) for flint and chert.

Changed 4 months ago by olly

Looking at the SVN history, this bug was introduced in 1.0.3, so 1.0.2 is indeed unaffected.

Changed 4 months ago by olly

  • status changed from assigned to closed
  • resolution set to fixed

Backported fix for flint to 1.0 branch (r11049).

This bug doesn't affect quartz, so we're done.

Changed 3 months ago by olly

  • summary changed from DatabaseCorruptError after deleting all documents. to DatabaseCorruptError after deleting all postings for a term
Note: See TracTickets for help on using tickets.