summaryrefslogtreecommitdiffstats
path: root/policy-core/src
diff options
context:
space:
mode:
authorRalph Straubs <rs8887@att.com>2017-07-17 04:23:23 -0500
committerRalph Straubs <rs8887@att.com>2017-07-17 04:24:04 -0500
commit43db8ee773f7505a328e4e04429d1bbaddcc9d9b (patch)
tree1a7bc682c96ebd48813b17c2c4262d0899a45d07 /policy-core/src
parent564f81837de6d50681270ed3f559cb7be068d3cd (diff)
[POLICY-75] Problems with KieScanner
1) Change the 'PolicySession.DefaultThreadModel' thread so it continually calls 'fireUntilHalt' until it is explicitly stopped by the 'stop()' method. This allows it to restart after 'KieScanner' triggers an update. 2) Remove call to 'startScanner' in 'PolicyContainer' constructor -- we saw at least one case where 'KieScanner' would repeatedly update the Drools container every 60 seconds. Change-Id: I0d0e6c5650cef12ca00cf88f9b8cc52323bb6317 Signed-off-by: Ralph Straubs <rs8887@att.com>
Diffstat (limited to 'policy-core/src')
-rw-r--r--policy-core/src/main/java/org/openecomp/policy/drools/core/PolicyContainer.java6
-rw-r--r--policy-core/src/main/java/org/openecomp/policy/drools/core/PolicySession.java4
2 files changed, 7 insertions, 3 deletions
diff --git a/policy-core/src/main/java/org/openecomp/policy/drools/core/PolicyContainer.java b/policy-core/src/main/java/org/openecomp/policy/drools/core/PolicyContainer.java
index 1b7941db..34988d32 100644
--- a/policy-core/src/main/java/org/openecomp/policy/drools/core/PolicyContainer.java
+++ b/policy-core/src/main/java/org/openecomp/policy/drools/core/PolicyContainer.java
@@ -124,7 +124,11 @@ public class PolicyContainer implements Startable
}
containers.add(this);
}
- startScanner(releaseId);
+ // 'startScanner(releaseId)' was called at this point, but we have seen
+ // at least one case where the Drools container was repeatedly updated
+ // every 60 seconds. It isn't clear what conditions resulted in this
+ // behavior, so the call was removed. If needed, it can be explicitly
+ // called from a feature.
}
/**
diff --git a/policy-core/src/main/java/org/openecomp/policy/drools/core/PolicySession.java b/policy-core/src/main/java/org/openecomp/policy/drools/core/PolicySession.java
index ebfcb025..4eb088c5 100644
--- a/policy-core/src/main/java/org/openecomp/policy/drools/core/PolicySession.java
+++ b/policy-core/src/main/java/org/openecomp/policy/drools/core/PolicySession.java
@@ -562,8 +562,8 @@ public class PolicySession
{
kieSession.fireUntilHalt();
- // if we fall through, it means 'KieSession.halt()' was called
- repeat = false;
+ // if we fall through, it means 'KieSession.halt()' was called,
+ // but this may be a result of 'KieScanner' doing an update
}
catch (Throwable e)
{