Ticket #287 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years 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 Download (2.8 KB) - added by flav 2 years ago.
Test file to reproduce error.
xapian-bug287-testcase.patch Download (1.1 KB) - added by olly 2 years ago.
Crude patch against trunk's api_wrdb.cc which shows the problem
flint-cursor-del.patch Download (0.9 KB) - added by olly 2 years ago.
Patch which should fix this for flint

Change History

Changed 2 years ago by flav

Test file to reproduce error.

Changed 2 years 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 2 years 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 2 years ago by olly

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

Changed 2 years ago by olly

Patch which should fix this for flint

Changed 2 years ago by olly

Fixed in trunk (r11048) for flint and chert.

Changed 2 years ago by olly

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

Changed 2 years 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 2 years 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.