Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#287 closed defect (fixed)

DatabaseCorruptError after deleting all postings for a term

Reported by: Flavio daCosta Owned by: Olly Betts
Priority: normal Milestone: 1.0.8
Component: Backend-Flint Version: 1.0.5
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: Linux

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 (3)

xapian_standalone_test.php (2.8 KB ) - added by Flavio daCosta 16 years ago.
Test file to reproduce error.
xapian-bug287-testcase.patch (1.1 KB ) - added by Olly Betts 16 years ago.
Crude patch against trunk's api_wrdb.cc which shows the problem
flint-cursor-del.patch (894 bytes ) - added by Olly Betts 16 years ago.
Patch which should fix this for flint

Download all attachments as: .zip

Change History (9)

by Flavio daCosta, 16 years ago

Attachment: xapian_standalone_test.php added

Test file to reproduce error.

comment:1 by Olly Betts, 16 years ago

Milestone: 1.0.8
Status: newassigned
Version: 1.0.5

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).

comment:2 by Olly Betts, 16 years ago

Component: OtherBackend-Flint
Keywords: DatabaseCorruptError php removed
Summary: DatabaseCorruptError in PHP bindings when using prefixed terms and delete_documentDatabaseCorruptError after deleting all documents.

I have a C++ reproducer.

by Olly Betts, 16 years ago

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

by Olly Betts, 16 years ago

Attachment: flint-cursor-del.patch added

Patch which should fix this for flint

comment:3 by Olly Betts, 16 years ago

Fixed in trunk (r11048) for flint and chert.

comment:4 by Olly Betts, 16 years ago

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

comment:5 by Olly Betts, 16 years ago

Resolution: fixed
Status: assignedclosed

Backported fix for flint to 1.0 branch (r11049).

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

comment:6 by Olly Betts, 16 years ago

Summary: DatabaseCorruptError after deleting all documents.DatabaseCorruptError after deleting all postings for a term
Note: See TracTickets for help on using tickets.