# HG changeset patch # User Chris Cannam # Date 1226665788 0 # Node ID f54381e01141e23df482ce3889dcd879e2487f4f # Parent a82645e788fcb1dd5f528da0271f86b1e91c1857 * Fix a deadlock * Make debug output more suited to datastore rdf implementation diff -r a82645e788fc -r f54381e01141 rdf/PluginRDFIndexer.cpp --- a/rdf/PluginRDFIndexer.cpp Fri Nov 14 10:10:05 2008 +0000 +++ b/rdf/PluginRDFIndexer.cpp Fri Nov 14 12:29:48 2008 +0000 @@ -342,17 +342,14 @@ QString identifier = (*i)["plugin_id"].value; if (identifier == "") { - cerr << "PluginRDFIndexer::indexURL: NOTE: Document at <" - << urlString.toStdString() - << "> fails to define any vamp:identifier for plugin <" + cerr << "PluginRDFIndexer::indexURL: NOTE: No vamp:identifier for plugin <" << pluginUri.toStdString() << ">" << endl; continue; } if (soUri == "") { - cerr << "PluginRDFIndexer::indexURL: NOTE: Document at <" - << urlString.toStdString() << "> does not associate plugin <" - << pluginUri.toStdString() << "> with any implementation library" + cerr << "PluginRDFIndexer::indexURL: NOTE: No implementation library for plugin <" + << pluginUri.toStdString() << ">" << endl; continue; } @@ -373,8 +370,7 @@ SimpleSPARQLQuery::singleResultQuery(localString, sonameQuery, "library_id"); QString soname = sonameValue.value; if (soname == "") { - cerr << "PluginRDFIndexer::indexURL: NOTE: Document at <" - << urlString.toStdString() << "> omits identifier for library <" + cerr << "PluginRDFIndexer::indexURL: NOTE: No identifier for library <" << soUri.toStdString() << ">" << endl; continue; @@ -393,12 +389,23 @@ foundSomething = true; if (m_idToDescriptionMap.find(pluginId) != m_idToDescriptionMap.end()) { +/*!!! + + This can happen quite legitimately when using an RDF datastore rather + than querying individual files, as of course the datastore contains + all plugin data found so far, and each time a file is added to it, + subsequent queries will return all older plugins as well. + + It would be more efficient to add everything at once and then do all + queries, of course. + cerr << "PluginRDFIndexer::indexURL: NOTE: Plugin id \"" << pluginId.toStdString() << "\", described in document at <" << urlString.toStdString() << ">, has already been described in document <" << m_idToDescriptionMap[pluginId].toStdString() << ">: ignoring this new description" << endl; +*/ continue; } diff -r a82645e788fc -r f54381e01141 transform/TransformFactory.cpp --- a/transform/TransformFactory.cpp Fri Nov 14 10:10:05 2008 +0000 +++ b/transform/TransformFactory.cpp Fri Nov 14 12:29:48 2008 +0000 @@ -63,12 +63,16 @@ void TransformFactory::startPopulationThread() { - MutexLocker locker(&m_uninstalledTransformsMutex, - "TransformFactory::startPopulationThread"); + m_uninstalledTransformsMutex.lock(); - if (m_thread) return; + if (m_thread) { + m_uninstalledTransformsMutex.unlock(); + return; + } + m_thread = new UninstalledTransformsPopulateThread(this); - m_thread = new UninstalledTransformsPopulateThread(this); + m_uninstalledTransformsMutex.unlock(); + m_thread->start(); } @@ -173,11 +177,11 @@ } if (m_uninstalledTransforms.find(id) != m_uninstalledTransforms.end()) { + m_uninstalledTransformsMutex.unlock(); return TransformNotInstalled; } m_uninstalledTransformsMutex.unlock(); - return TransformUnknown; }