aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJorge Hernandez <jh1730@att.com>2018-05-22 11:47:41 -0500
committerJorge Hernandez <jh1730@att.com>2018-05-22 11:47:41 -0500
commit5b3f1e43878c72d04deff9b36635795ca88f458c (patch)
tree02d006915b8ee36d2a9986a9feefb9c7ca143d9d
parent3fcc2a7a85e885b2807d08d820e3c716185a7710 (diff)
reduce transaction cache size
- reduce memory footprint - avoid verbose logging from cache when the object is not in the cache to invalidate it. Change-Id: I819cfbcfe32f5afdd238397c79ccd5cebd4534b8 Issue-ID: POLICY-852 Signed-off-by: Jorge Hernandez <jh1730@att.com>
-rw-r--r--controlloop/common/feature-controlloop-trans/src/main/feature/config/feature-controlloop-trans.properties4
-rw-r--r--controlloop/common/feature-controlloop-trans/src/main/java/org/onap/policy/drools/apps/controlloop/feature/trans/ControlLoopMetrics.java3
2 files changed, 4 insertions, 3 deletions
diff --git a/controlloop/common/feature-controlloop-trans/src/main/feature/config/feature-controlloop-trans.properties b/controlloop/common/feature-controlloop-trans/src/main/feature/config/feature-controlloop-trans.properties
index af34a955f..7744defa4 100644
--- a/controlloop/common/feature-controlloop-trans/src/main/feature/config/feature-controlloop-trans.properties
+++ b/controlloop/common/feature-controlloop-trans/src/main/feature/config/feature-controlloop-trans.properties
@@ -17,5 +17,5 @@
# limitations under the License.
# ============LICENSE_END=========================================================
###
-controlloop.cache.transactions.size=500
-controllop.cache.transactions.timeout.seconds=3600
+controlloop.cache.transactions.size=100
+controllop.cache.transactions.timeout.seconds=1800
diff --git a/controlloop/common/feature-controlloop-trans/src/main/java/org/onap/policy/drools/apps/controlloop/feature/trans/ControlLoopMetrics.java b/controlloop/common/feature-controlloop-trans/src/main/java/org/onap/policy/drools/apps/controlloop/feature/trans/ControlLoopMetrics.java
index 2482d1814..3c818b8b3 100644
--- a/controlloop/common/feature-controlloop-trans/src/main/java/org/onap/policy/drools/apps/controlloop/feature/trans/ControlLoopMetrics.java
+++ b/controlloop/common/feature-controlloop-trans/src/main/java/org/onap/policy/drools/apps/controlloop/feature/trans/ControlLoopMetrics.java
@@ -307,7 +307,8 @@ class CacheBasedControlLoopMetricsManager implements ControlLoopMetrics {
}
this.transaction(notification, startTime);
- cache.invalidate(startNotification);
+ if (startNotification != null)
+ cache.invalidate(startNotification);
}
protected void evicted(VirtualControlLoopNotification notification) {