aboutsummaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src/main
diff options
context:
space:
mode:
authormpriyank <priyank.maheshwari@est.tech>2023-01-16 14:14:41 +0000
committermpriyank <priyank.maheshwari@est.tech>2023-01-17 17:26:46 +0000
commit0ddf7a0d1ef4bef454862a75f96832c81c5da8e3 (patch)
treedf54a672bbc2fc879e63a182f745e75e30319d79 /cps-ncmp-service/src/main
parentecfce9d3e46410e1158c0f640fa833c101c4bda4 (diff)
Bug Analysis for LOCKED cmHandles
- Increased TTL time from 60secs to 200secs - Added few info level logs to analyze more Issue-ID: CPS-1446 Change-Id: If4456040e51bd33a5bf321f48440e44af7698154 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
Diffstat (limited to 'cps-ncmp-service/src/main')
-rw-r--r--cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/config/embeddedcache/SynchronizationCacheConfig.java4
-rw-r--r--cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/inventory/sync/ModuleSyncTasks.java5
-rw-r--r--cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/inventory/sync/ModuleSyncWatchdog.java7
3 files changed, 10 insertions, 6 deletions
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/config/embeddedcache/SynchronizationCacheConfig.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/config/embeddedcache/SynchronizationCacheConfig.java
index 5154be7990..c9eb345b24 100644
--- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/config/embeddedcache/SynchronizationCacheConfig.java
+++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/config/embeddedcache/SynchronizationCacheConfig.java
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START========================================================
- * Copyright (C) 2022 Nordix Foundation
+ * Copyright (C) 2022-2023 Nordix Foundation
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -38,7 +38,7 @@ import org.springframework.context.annotation.Configuration;
@Configuration
public class SynchronizationCacheConfig {
- public static final int MODULE_SYNC_STARTED_TTL_SECS = 60;
+ public static final int MODULE_SYNC_STARTED_TTL_SECS = 200;
public static final int DATA_SYNC_SEMAPHORE_TTL_SECS = 1800;
private static final QueueConfig commonQueueConfig = createQueueConfig();
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/inventory/sync/ModuleSyncTasks.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/inventory/sync/ModuleSyncTasks.java
index 004ef289ac..3fbebe0771 100644
--- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/inventory/sync/ModuleSyncTasks.java
+++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/inventory/sync/ModuleSyncTasks.java
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2022 Nordix Foundation
+ * Copyright (C) 2022-2023 Nordix Foundation
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -97,6 +97,7 @@ public class ModuleSyncTasks {
for (final YangModelCmHandle failedCmHandle : failedCmHandles) {
final CompositeState compositeState = failedCmHandle.getCompositeState();
final boolean isReadyForRetry = syncUtils.isReadyForRetry(compositeState);
+ log.info("Retry for cmHandleId : {} is {}", failedCmHandle.getId(), isReadyForRetry);
if (isReadyForRetry) {
final String resetCmHandleId = failedCmHandle.getId();
log.debug("Reset cm handle {} state to ADVISED to be re-attempted by module-sync watchdog",
@@ -115,7 +116,7 @@ public class ModuleSyncTasks {
private void removeResetCmHandleFromModuleSyncMap(final String resetCmHandleId) {
if (moduleSyncStartedOnCmHandles.remove(resetCmHandleId) != null) {
- log.debug("{} removed from in progress map", resetCmHandleId);
+ log.info("{} removed from in progress map", resetCmHandleId);
}
}
}
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/inventory/sync/ModuleSyncWatchdog.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/inventory/sync/ModuleSyncWatchdog.java
index f629b71d26..e5398374d9 100644
--- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/inventory/sync/ModuleSyncWatchdog.java
+++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/inventory/sync/ModuleSyncWatchdog.java
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2022 Nordix Foundation
+ * Copyright (C) 2022-2023 Nordix Foundation
* Modifications Copyright (C) 2022 Bell Canada
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -88,11 +88,13 @@ public class ModuleSyncWatchdog {
public void resetPreviouslyFailedCmHandles() {
log.info("Processing module sync retry-watchdog waking up.");
final List<YangModelCmHandle> failedCmHandles = syncUtils.getModuleSyncFailedCmHandles();
+ log.info("Retrying {} cmHandles", failedCmHandles.size());
moduleSyncTasks.resetFailedCmHandles(failedCmHandles);
}
private void preventBusyWait() {
try {
+ log.info("Busy waiting now");
TimeUnit.MILLISECONDS.sleep(PREVENT_CPU_BURN_WAIT_TIME_MILLIS);
} catch (final InterruptedException e) {
Thread.currentThread().interrupt();
@@ -108,6 +110,7 @@ public class ModuleSyncWatchdog {
log.warn("Unable to add cm handle {} to the work queue", advisedCmHandle.getLeaves().get("id"));
}
}
+ log.info("Work Queue Size : {}", moduleSyncWorkQueue.size());
}
}
@@ -122,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.debug("module sync for {} already in progress by other instance", cmHandleId);
+ log.info("module sync for {} already in progress by other instance", cmHandleId);
} else {
nextBatch.add(batchCandidate);
}