summaryrefslogtreecommitdiffstats
path: root/feature-active-standby-management/src/main/java
diff options
context:
space:
mode:
authorKevin McKiou <km097d@att.com>2018-01-08 16:35:43 -0600
committerKevin McKiou <km097d@att.com>2018-01-08 16:36:15 -0600
commit58361f3aa3969cc196ea81070633571bef5fe910 (patch)
tree91fb1bb1e64558db4344bbd6aae24a90f717c779 /feature-active-standby-management/src/main/java
parent3db97797677739506be089c28365aff91695bdc2 (diff)
Initialize allSeemsWell Correctly
Patch 1: Correctly initialize DroolsPdpsElectionHandler.allSeemsWell upon the first call to checkWaitTimer(). Issue-ID: POLICY-519 Change-Id: I0b9ad0bfba211d705c2d9f9305694956ca3951b6 Signed-off-by: Kevin McKiou <km097d@att.com>
Diffstat (limited to 'feature-active-standby-management/src/main/java')
-rw-r--r--feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/DroolsPdpsElectionHandler.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/DroolsPdpsElectionHandler.java b/feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/DroolsPdpsElectionHandler.java
index e7f40772..13348c78 100644
--- a/feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/DroolsPdpsElectionHandler.java
+++ b/feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/DroolsPdpsElectionHandler.java
@@ -60,7 +60,12 @@ public class DroolsPdpsElectionHandler implements ThreadRunningChecker {
private String pdpdNowActive;
private String pdpdLastActive;
- private Boolean allSeemsWell=true;
+ /*
+ * Start allSeemsWell with a value of null so that, on the first run
+ * of the checkWaitTimer it will set the value in IntegrityMonitor
+ * regardless of whether it needs to be set to true or false.
+ */
+ private Boolean allSeemsWell=null;
private StateManagementFeatureAPI stateManagementFeature;
@@ -944,7 +949,7 @@ public class DroolsPdpsElectionHandler implements ThreadRunningChecker {
//give it 10 times leeway
if((nowMs - waitTimerMs) > 10*pdpUpdateInterval){
- if(allSeemsWell){
+ if(allSeemsWell==null || allSeemsWell){
allSeemsWell = false;
if(logger.isDebugEnabled()){
logger.debug("checkWaitTimer: calling allSeemsWell with ALLNOTWELL param");
@@ -956,7 +961,7 @@ public class DroolsPdpsElectionHandler implements ThreadRunningChecker {
logger.error("checkWaitTimer: nowMs - waitTimerMs = {}"
+ ", exceeds 10* pdpUpdateInterval = {}"
+ " DesignationWaiter is STALLED!", (nowMs - waitTimerMs), (10*pdpUpdateInterval));
- }else if(!allSeemsWell){
+ }else if(allSeemsWell==null || !allSeemsWell){
allSeemsWell = true;
stateManagementFeature.allSeemsWell(this.getClass().getName(),
StateManagementFeatureAPI.ALLSEEMSWELL,