summaryrefslogtreecommitdiffstats
path: root/feature-active-standby-management/src/main
diff options
context:
space:
mode:
authorKevin McKiou <km097d@att.com>2017-11-21 13:29:49 -0600
committerKevin McKiou <km097d@att.com>2017-11-21 13:30:21 -0600
commit49e60f1b0c95f63ce48fde526cc5c1ec1f046d74 (patch)
treed2005ba9fa016f7dc9ccbdf5afff43aee2b54081 /feature-active-standby-management/src/main
parent522edbec8a09d2aa7514980b6e8593015d75814d (diff)
Election Handler Cleanup
Under stress, the election handler in feature-active-standby-management may not get a chance to run within the allowed window causing the "watcher" thread to kill it and restart it. The run window is expanded. Also the pdp.updateInterval and pdp.checkInterval parameter values are increased appropriately in the properties file. Issue-ID: POLICY-484 Change-Id: I0c1c2d4fdfbc408be929c56e451b92fc7ad4464a Signed-off-by: Kevin McKiou <km097d@att.com>
Diffstat (limited to 'feature-active-standby-management/src/main')
-rw-r--r--feature-active-standby-management/src/main/feature/config/feature-active-standby-management.properties4
-rw-r--r--feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/DroolsPdpsElectionHandler.java8
2 files changed, 6 insertions, 6 deletions
diff --git a/feature-active-standby-management/src/main/feature/config/feature-active-standby-management.properties b/feature-active-standby-management/src/main/feature/config/feature-active-standby-management.properties
index d9fd6ca3..fec8094e 100644
--- a/feature-active-standby-management/src/main/feature/config/feature-active-standby-management.properties
+++ b/feature-active-standby-management/src/main/feature/config/feature-active-standby-management.properties
@@ -30,8 +30,8 @@ resource.name=pdp1
site_name=site1
# Needed by DroolsPdpsElectionHandler
-pdp.checkInterval=1500
-pdp.updateInterval=1000
+pdp.checkInterval=2500
+pdp.updateInterval=2500
#pdp.timeout=3000
# Need long timeout, because testTransaction is only run every 10 seconds.
pdp.timeout=15000
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 b0f1a12a..e9526eb7 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
@@ -992,11 +992,11 @@ public class DroolsPdpsElectionHandler implements ThreadRunningChecker {
long nowMs = now.getTime();
long waitTimerMs = waitTimerLastRunDate.getTime();
- //give it 2 times leeway
- if((nowMs - waitTimerMs) > 2*pdpUpdateInterval){
+ //give it 10 times leeway
+ if((nowMs - waitTimerMs) > 10*pdpUpdateInterval){
logger.error("checkWaitTimer: nowMs - waitTimerMs = {}"
- + ", exceeds pdpUpdateInterval + 2000 = {}"
- + "Will reschedule waitTimer timer", (nowMs - waitTimerMs), (2*pdpUpdateInterval));
+ + ", exceeds 10* pdpUpdateInterval = {}"
+ + "Will reschedule waitTimer timer", (nowMs - waitTimerMs), (10*pdpUpdateInterval));
try{
// Recalculate since the thread could have been stalled on the synchronize()