RED-9255: Fixed possible higher versions in entityLogs than in dictionaries or... #638

Merged
dominique.eiflaender1 merged 1 commits from RED-9255-master into master 2024-08-01 11:30:21 +02:00
2 changed files with 6 additions and 2 deletions

View File

@ -79,7 +79,11 @@ public class EntityTypeImportService {
typeId = returnedType.getTypeId();
}
dictionaryPersistenceService.setVersion(typeId, type.getVersion());
// Setting dictionary version for an existing dossierTemplate can break the analysis dictionary logic,
// when files have newer dictionary versions set in entity log. This will lead to endless analysis.
// Do not call this:
// dictionaryPersistenceService.setVersion(typeId, type.getVersion());
typeIdsAdded.add(typeId);

View File

@ -146,7 +146,7 @@ public class RulesPersistenceService {
ruleSet.setDossierTemplateId(dossierTemplateId);
ruleSet.setRuleFileType(ruleFileType.name());
ruleSet.setValue(rules);
ruleSet.setVersion(version);
ruleSet.setVersion(ruleSet.getVersion() + 1); // Setting rules version in existing dossier template will break analysis, if there are files with higher versions in entity log. So only increment.
ruleSet.setTimeoutDetected(timeoutDetected);
}, () -> {
RuleSetEntity ruleSet = new RuleSetEntity();