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

another shot at the config change detection

parent 26375194
No related branches found
No related tags found
No related merge requests found
...@@ -366,14 +366,12 @@ public class ERISConnector { ...@@ -366,14 +366,12 @@ public class ERISConnector {
} }
} }
} }
logger.debug(" -> config has changed for living partition {}: {}", livingPartition, configHasChanged); 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 // figure out if the config has changed by comparing the new and old config by access path and attributes
configHasChanged = false; configHasChanged = false;
if (livingPartition.getConfigurations().size() != configsToUse.size()) { outer:
configHasChanged = true; for (ERISLPConfiguration newConfig : configsToUse) {
} else {
outer: for (ERISLPConfiguration newConfig : configsToUse) {
for (ERISLPConfiguration oldConfig : livingPartition.getConfigurations()) { for (ERISLPConfiguration oldConfig : livingPartition.getConfigurations()) {
if (oldConfig.getAccessPath() == newConfig.getAccessPath() && oldConfig.getAttributesAndKeys().containsAll(newConfig.getAttributesAndKeys())) { if (oldConfig.getAccessPath() == newConfig.getAccessPath() && oldConfig.getAttributesAndKeys().containsAll(newConfig.getAttributesAndKeys())) {
continue outer; continue outer;
...@@ -382,8 +380,20 @@ public class ERISConnector { ...@@ -382,8 +380,20 @@ public class ERISConnector {
configHasChanged = true; configHasChanged = true;
break; break;
} }
logger.debug(" -> algorithm '2' (the one that decides) says config has changed for living partition {}: {}", livingPartition, configHasChanged);
logger.debug(" old config");
for (ERISLPConfiguration oldConfig : livingPartition.getConfigurations()) {
logger.debug(" {}", oldConfig);
}
logger.debug(" new config");
for (ERISLPConfiguration newConfig : configsToUse) {
logger.debug(" {}", newConfig);
} }
if (configHasChanged) { if (configHasChanged) {
// write back changed config // write back changed config
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment