Skip to content
Snippets Groups Projects
Commit bf97e7e2 authored by Johannes Mey's avatar Johannes Mey
Browse files

next try to fix change detection

parent 28955eea
No related branches found
No related tags found
No related merge requests found
......@@ -369,6 +369,8 @@ public class ERISConnector {
logger.debug(" -> algorithm '1' says config has changed for living partition {}: {}", livingPartition, configHasChanged);
// figure out if the config has changed by comparing the new and old config by access path and attributes
// check if all new configs are in oldconfig
configHasChanged = false;
outer:
for (ERISLPConfiguration newConfig : configsToUse) {
......@@ -380,6 +382,30 @@ public class ERISConnector {
configHasChanged = true;
break;
}
if (!configHasChanged) {
outer:
for (ERISLPConfiguration oldConfig : livingPartition.getConfigurations()) {
// skip default ap
if (oldConfig.getAttributesAndKeys().isEmpty()) continue;
// if the old config contains only linkage attributes, continue
boolean linkageOnly = true;
for (ERISAttribute attribute : oldConfig.getAttributesAndKeys()) {
if (!attribute.isLinkage()) {
linkageOnly = false;
}
}
if (linkageOnly) continue;
for (ERISLPConfiguration newConfig : configsToUse) {
if (oldConfig.getAccessPath() == newConfig.getAccessPath() && oldConfig.getAttributesAndKeys().containsAll(newConfig.getAttributesAndKeys())) {
continue outer;
}
}
configHasChanged = true;
break;
}
}
logger.debug(" -> algorithm '2' (the one that decides) says config has changed for living partition {}: {}", livingPartition, configHasChanged);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment