Optimal TTL value for Module Sync WD 53/132953/2
authormpriyank <priyank.maheshwari@est.tech>
Thu, 19 Jan 2023 14:31:54 +0000 (14:31 +0000)
committermpriyank <priyank.maheshwari@est.tech>
Thu, 19 Jan 2023 15:44:03 +0000 (15:44 +0000)
- setting optimal value for TTL to 120secs from 200secs.
- Since the retry parameter is configurable , not changing the same in
  patch , but can be set as per the environment we are working on

Issue-ID: CPS-1446
Change-Id: Ifaca07ad1a049a88b2609fd7a1a8e1e2fa478dd9
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/config/embeddedcache/SynchronizationCacheConfig.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/inventory/sync/ModuleSyncWatchdog.java

index c9eb345..5c3cb60 100644 (file)
@@ -38,7 +38,7 @@ import org.springframework.context.annotation.Configuration;
 @Configuration
 public class SynchronizationCacheConfig {
 
-    public static final int MODULE_SYNC_STARTED_TTL_SECS = 200;
+    public static final int MODULE_SYNC_STARTED_TTL_SECS = 120;
     public static final int DATA_SYNC_SEMAPHORE_TTL_SECS = 1800;
 
     private static final QueueConfig commonQueueConfig = createQueueConfig();
index e539837..8acaa0a 100644 (file)
@@ -125,7 +125,7 @@ public class ModuleSyncWatchdog {
                     moduleSyncStartedOnCmHandles.putIfAbsent(cmHandleId, VALUE_FOR_HAZELCAST_IN_PROGRESS_MAP,
                             SynchronizationCacheConfig.MODULE_SYNC_STARTED_TTL_SECS, TimeUnit.SECONDS));
             if (alreadyAddedToInProgressMap) {
-                log.info("module sync for {} already in progress by other instance", cmHandleId);
+                log.debug("module sync for {} already in progress by other instance", cmHandleId);
             } else {
                 nextBatch.add(batchCandidate);
             }