Merge branch 'develop'

This commit is contained in:
Tuna Aksoy
2017-09-28 10:42:38 +01:00
3 changed files with 20 additions and 8 deletions
@@ -1313,6 +1313,12 @@ public class AlfrescoSolrDataModel implements QueryConstants
}
public boolean removeModel(QName modelQName)
{
modelErrors.remove(modelQName);
dictionaryDAO.removeModel(modelQName);
return true;
}
private Set<String> validateModel(M2Model model)
{
@@ -306,11 +306,9 @@ public class ModelTracker extends AbstractTracker implements Tracker
}
break;
case REMOVED:
// At the moment we do not unload models - I can see no side effects ....
// However search is used to check for references to indexed properties or types
// This will be partially broken anyway due to eventual consistency
// A model should only be unloaded if there are no data dependencies
// Should have been on the de-lucene list.
// We now remove models as we see them - MNT-17627
// Models have to be deleted from disk before we remove them from memory
// We need to know the prefix for the uri to delete them
break;
}
}
@@ -348,7 +346,15 @@ public class ModelTracker extends AbstractTracker implements Tracker
nos.close();
break;
case REMOVED:
removeMatchingModels(alfrescoModelDir, modelDiff.getModelName());
// This will remove the model from the dictionary on completion
try
{
removeMatchingModels(alfrescoModelDir, modelDiff.getModelName());
}
finally
{
AlfrescoSolrDataModel.getInstance().removeModel(modelDiff.getModelName());
}
break;
}
}
@@ -1,7 +1,7 @@
version: '2'
services:
platform:
image: docker-internal.alfresco.com/platform:5.2.2-SNAPSHOT
image: docker-internal.alfresco.com/platform:5.2.3-SNAPSHOT
environment:
JAVA_TOOL_OPTIONS: "-Dsolr.host=solr6 -Dsolr.port=8983 -Dsolr.secureComms=none -Dsolr.base.url=/solr -Dindex.subsystem.name=solr6"
ports:
@@ -24,4 +24,4 @@ services:
depends_on:
- platform
ports:
- "8083:8983" #Browser port for Solr
- "8083:8983" #Browser port for Solr