From 5b3f1e43878c72d04deff9b36635795ca88f458c Mon Sep 17 00:00:00 2001 From: Jorge Hernandez Date: Tue, 22 May 2018 11:47:41 -0500 Subject: 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 --- .../src/main/feature/config/feature-controlloop-trans.properties | 4 ++-- .../drools/apps/controlloop/feature/trans/ControlLoopMetrics.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'controlloop/common/feature-controlloop-trans/src/main') 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) { -- cgit 1.2.3-korg