logic: indexer count and fixes

* added option to define the amount of parallel indexers in the appsettings
* fixed unparsed files query in ASTVisitor
* fixed: to update a node's type in the storage the node does not have to be defined anymore
This commit is contained in:
malte_langkabel
2016-05-13 16:30:16 +02:00
parent 7bb40f2630
commit 67e4d84631
10 changed files with 55 additions and 20 deletions
+9 -9
View File
@@ -47,18 +47,18 @@ Id IntermediateStorage::addNode(int type, const std::string& serializedName, int
std::unordered_map<std::string, Id>::const_iterator it = m_nodeNamesToIds.find(serialized);
if (it != m_nodeNamesToIds.end())
{
// update stored information
if (definitionType > 0)
std::map<Id, std::shared_ptr<StorageNode>>::const_iterator it2 = m_nodeIdsToData.find(it->second);
std::shared_ptr<StorageNode> storageNode = it2->second;
if (storageNode->definitionType == 0)
{
std::map<Id, std::shared_ptr<StorageNode>>::const_iterator it2 = m_nodeIdsToData.find(it->second);
std::shared_ptr<StorageNode> storageNode = it2->second;
if (storageNode->definitionType == 0)
if (definitionType > 0)
{
storageNode->definitionType = definitionType;
if (storageNode->type < type)
{
storageNode->type = type;
}
}
if (storageNode->type < type)
{
storageNode->type = type;
}
}
return it->second;
+7 -3
View File
@@ -65,10 +65,14 @@ Id PersistentStorage::addNode(int type, const std::string& serializedName, int d
}
else
{
if (storedNode.definitionType == 0 && definitionType > 0)
if (storedNode.definitionType == 0)
{
m_sqliteStorage.setNodeDefinitionType(definitionType, nodeId);
if(storedNode.type < type)
if (definitionType > 0)
{
m_sqliteStorage.setNodeDefinitionType(definitionType, nodeId);
}
if (storedNode.type < type)
{
m_sqliteStorage.setNodeType(type, nodeId);
}