Use PTMutexLocker in workqueue, and make it restartable
This commit is contained in:
@@ -64,6 +64,7 @@ bool ConfIndexer::index(bool resetbefore, ixType typestorun)
|
||||
deleteZ(m_fsindexer);
|
||||
m_fsindexer = new FsIndexer(m_config, &m_db, m_updater);
|
||||
if (!m_fsindexer || !m_fsindexer->index()) {
|
||||
m_db.close();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -72,6 +73,7 @@ bool ConfIndexer::index(bool resetbefore, ixType typestorun)
|
||||
deleteZ(m_beagler);
|
||||
m_beagler = new BeagleQueueIndexer(m_config, &m_db, m_updater);
|
||||
if (!m_beagler || !m_beagler->index()) {
|
||||
m_db.close();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -79,8 +81,10 @@ bool ConfIndexer::index(bool resetbefore, ixType typestorun)
|
||||
if (typestorun == IxTAll) {
|
||||
// Get rid of all database entries that don't exist in the
|
||||
// filesystem anymore. Only if all *configured* indexers ran.
|
||||
if (m_updater && !m_updater->update(DbIxStatus::DBIXS_PURGE, string()))
|
||||
if (m_updater && !m_updater->update(DbIxStatus::DBIXS_PURGE, string())) {
|
||||
m_db.close();
|
||||
return false;
|
||||
}
|
||||
m_db.purge();
|
||||
}
|
||||
|
||||
|
||||
@@ -471,8 +471,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
deleteZ(confindexer);
|
||||
o_reexec->insertArgs(vector<string>(1, "-n"));
|
||||
LOGDEB(("recollindex: calling reexec after init path with "
|
||||
"option -n\n"));
|
||||
LOGINFO(("recollindex: reexecuting with -n after initial full pass\n"));
|
||||
// Note that -n will be inside the reexec when we come
|
||||
// back, but the monitor will explicitely strip it before
|
||||
// starting a config change exec to ensure that we do a
|
||||
|
||||
Reference in New Issue
Block a user