Opened 15 years ago
Closed 15 years ago
#450 closed defect (fixed)
wdf_upper_bound is not always correct on WritableDatabase
Reported by: | Richard Boulton | Owned by: | Olly Betts |
---|---|---|---|
Priority: | normal | Milestone: | 1.1.5 |
Component: | Backend-Chert | Version: | SVN trunk |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Operating System: | All |
Description
If get_wdf_upper_bound() is called on a WritableDatabase when unflush modifications have been made to a term, an incorrect bound can be returned.
For example, I will attach a patch to tests/dbcheck.cc which makes it check the consistency of bounds. If the patch is applied to SVN trunk, various testcases will fail: for example, modtermwdf1 will fail at line 135 with the error:
/home/richard/private/Working/xapian/trunk/xapian-core/tests/dbcheck.cc:276: (wdf_upper_bound) <= (db.get_wdf_upper_bound(*t)) Evaluates to: 2 <= 0
Adding further debugging shows that this is testing the bound for the term "takeaway", for which the posting list contains one entry with wdf 2, so db.get_wdf_upper_bound(*t) should be returning at least 2.
Attachments (1)
Change History (2)
by , 15 years ago
Attachment: | dbcheck.patch added |
---|
comment:1 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Patch to dbcheck to check integrity of bounds