Update docs related to lock 31/139731/1
authormpriyank <priyank.maheshwari@est.tech>
Fri, 20 Dec 2024 11:31:58 +0000 (11:31 +0000)
committermpriyank <priyank.maheshwari@est.tech>
Fri, 20 Dec 2024 11:32:48 +0000 (11:32 +0000)
- added the distributed lock in the documentation as well
- updated the log level to debug to refrain printing every iteration of
  the scheduler

Issue-ID: CPS-2479
Change-Id: Ieeeff46168d70aca6f423e82bda15a12d6c405a5
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/sync/ModuleSyncWatchdog.java
docs/deployment.rst

index 5b71a8a..32e1c49 100644 (file)
@@ -92,7 +92,7 @@ public class ModuleSyncWatchdog {
      */
     public void populateWorkQueueIfNeeded() {
         if (moduleSyncWorkQueue.isEmpty() && cpsAndNcmpLock.tryLock(MODULE_SYNC_WORK_QUEUE_LOCK_NAME)) {
-            log.info("Lock acquired by thread : {}", Thread.currentThread().getName());
+            log.debug("Lock acquired by thread : {}", Thread.currentThread().getName());
             try {
                 populateWorkQueue();
                 if (moduleSyncWorkQueue.isEmpty()) {
@@ -100,7 +100,7 @@ public class ModuleSyncWatchdog {
                 }
             } finally {
                 cpsAndNcmpLock.unlock(MODULE_SYNC_WORK_QUEUE_LOCK_NAME);
-                log.info("Lock released by thread : {}", Thread.currentThread().getName());
+                log.debug("Lock released by thread : {}", Thread.currentThread().getName());
             }
         }
     }
index 9823fa2..2a17e30 100644 (file)
@@ -357,5 +357,7 @@ Below are the list of distributed datastructures that we have.
 | cps-ncmp     | moduleSetTagsBeingProcessed        | Track module set tags which are processed to prevent      |
 |              |                                    | multiple threads working with same tag.                   |
 +--------------+------------------------------------+-----------------------------------------------------------+
+| cps-ncmp     | cpsAndNcmpLock                     | Cps and NCMP distributed lock for various use cases.      |
++--------------+------------------------------------+-----------------------------------------------------------+
 
-Total number of caches : 7
+Total number of caches : 8