From 100cfebb4b550f23b5b304d4913c46dda0c06154 Mon Sep 17 00:00:00 2001 From: mpriyank Date: Mon, 27 Mar 2023 12:54:45 +0100 Subject: Enhanced logging for bug - Added minor logging and temporarily converted some debug logs to info level Issue-ID: CPS-1566 Change-Id: I2c706ecd601b06f2a92388b318a44640c682bdd1 Signed-off-by: mpriyank --- .../org/onap/cps/ncmp/api/inventory/sync/ModuleSyncWatchdog.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 8acaa0abe3..e2330a7135 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 @@ -69,7 +69,7 @@ public class ModuleSyncWatchdog { while (!moduleSyncWorkQueue.isEmpty()) { if (batchCounter.get() <= asyncTaskParallelismLevel) { final Collection nextBatch = prepareNextBatch(); - log.debug("Processing module sync batch of {}. {} batch(es) active.", + log.info("Processing module sync batch of {}. {} batch(es) active.", nextBatch.size(), batchCounter.get()); asyncTaskExecutor.executeTask(() -> moduleSyncTasks.performModuleSync(nextBatch, batchCounter), @@ -118,15 +118,16 @@ public class ModuleSyncWatchdog { final Collection nextBatchCandidates = new HashSet<>(MODULE_SYNC_BATCH_SIZE); final Collection nextBatch = new HashSet<>(MODULE_SYNC_BATCH_SIZE); moduleSyncWorkQueue.drainTo(nextBatchCandidates, MODULE_SYNC_BATCH_SIZE); - log.debug("nextBatchCandidates size : {}", nextBatchCandidates.size()); + log.info("nextBatchCandidates size : {}", nextBatchCandidates.size()); for (final DataNode batchCandidate : nextBatchCandidates) { final String cmHandleId = String.valueOf(batchCandidate.getLeaves().get("id")); final boolean alreadyAddedToInProgressMap = VALUE_FOR_HAZELCAST_IN_PROGRESS_MAP.equals( 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 { + log.info("Adding cmHandle : {} to current batch", cmHandleId); nextBatch.add(batchCandidate); } } -- cgit 1.2.3-korg