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:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user