]> Sergey Matveev's repositories - public-inbox.git/commit
searchidx: do not modify Xapian DB while iterating
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>
Tue, 27 Feb 2018 20:25:23 +0000 (20:25 +0000)
committerEric Wong <e@80x24.org>
Tue, 27 Feb 2018 22:12:16 +0000 (22:12 +0000)
commitebb59815035b42c276a89a585e16e69f51dbdb98
treeec2f78f2cc5fbda67141ac7c79ed0b28f3b4aee3
parentb400772bf3801cb29949cf2ae5021e8e3a8e2d94
searchidx: do not modify Xapian DB while iterating

Iterating through a list of documents while modifying them does
not seem to be supported in Xapian and it can trigger
DatabaseCorruptError exceptions.  This only worked with past
datasets out of dumb luck.  With the work-in-progress "v2"
public-inbox layout, this problem might become more visible
as the "thread skeleton" is partitioned out to a separate,
smaller Xapian database.

I've reproduced the problem on both Debian 8.x and 9.x with
Xapian 1.2.19 (chert backend) and 1.4.3 (glass backend)
respectively.
lib/PublicInbox/SearchIdx.pm