[Xapian-tickets] [Xapian] #645: Read block errors after reopen()
Xapian
nobody at xapian.org
Tue Jun 10 07:06:13 BST 2014
#645: Read block errors after reopen()
---------------------------+-----------------------------
Reporter: medoc | Owner: olly
Type: defect | Status: assigned
Priority: low | Milestone: 1.3.3
Component: Backend-Chert | Version: 1.2.16
Severity: normal | Resolution:
Keywords: | Blocked By:
Blocking: | Operating System: All
---------------------------+-----------------------------
\
\
\
\
\
\
Comment (by medoc):
After reading your info about flushes(), I checked the code to see if I
was still using allterms_begin() (no). I guess that the actual calls
involved may have some interest if you try to reproduce the issue.
So the following pseudo-code is executed when testing if index data is up
to date for the next indexing candidate document:
{{{
// test doc index data up to date
try {
string uniterm = make_uniterm(myid); // Unique id term for doc
Xapian::PostingIterator docid = xdb.postlist_begin(uniterm);
Xapian::Document doc = xdb.get_document(docid);
string oldsig = doc.getvalue(VALUE_SIG);
// Do non-xapian stuff with sig
vector<Xapian::docid> children;
try {
string pterm = make_parentterm(myid);// Unique id term as parent
children.insert(children.begin(), xdb.postlist_begin(pterm),
xdb.postlist_end(pterm));
// do non-xapian stuff with children docids
} catch (Xapian::DatabaseModifiedError) {
// reopen and repeat
}
} catch (Xapian::DatabaseModifiedError) {
// reopen and repeat
}
}}}
There are 2 try blocks because the internal one is in a function which can
also be called directly at other times. As far as I know, it's the
external exception which is catched in general.
After the reopen, the first error is usually (apparently not always) the
one about the wrong level. Then I get the read errors, for every call of
this routine, and always the same block, until the end of indexing (so
what happens is that all following documents get reindexed). I don't have
a log file at hand, unfortunately, and things are not perfectly
repeatable, so this is all subject to a little doubt, but I could possibly
restart the test loop if you need more info.
The backend is the current default one for 1.2 (Chert I guess? iamchert
exists in the xapian directory).
\
\
\
--
Ticket URL: <http://trac.xapian.org/ticket/645#comment:2>
Xapian <http://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list