Refactor and Optimize ModuleSyncWatchdog for Improved Lock Handling and Queue Management 08/139208/4
authorsourabh_sourabh <sourabh.sourabh@est.tech>
Thu, 17 Oct 2024 07:22:56 +0000 (08:22 +0100)
committersourabh_sourabh <sourabh.sourabh@est.tech>
Thu, 17 Oct 2024 10:49:41 +0000 (11:49 +0100)
commit16be5fb7abcb2979b6f078bbea54bcf9b01e41ce
tree5f96f2a60dd69c85cff89d55cfe5be59354c07cc
parent20406efebd6b496c7aedb297cc89d7d9317545d6
Refactor and Optimize ModuleSyncWatchdog for Improved Lock Handling and Queue Management

- Enhanced logging for populateWorkQueueIfNeeded and resetPreviouslyLockedCmHandles
methods, improving clarity and error handling.
- Improved readability and maintainability of the locking mechanism with
  Hazelcast's FencedLock.
- Optimized error handling in catch blocks, logging detailed exception messages and stack
traces for better troubleshooting.
- Refined lock acquisition and release flow, with clear log messages for both successful
and failed lock operations, ensuring safe handling of Hazelcast distributed locks.

Issue-ID: CPS-2403
Change-Id: Ie089f36a817d4965782235b51ee987ef054516b1
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/sync/ModuleSyncTasks.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/sync/ModuleSyncWatchdog.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/sync/SynchronizationCacheConfig.java
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/sync/ModuleSyncTasksSpec.groovy
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/sync/ModuleSyncWatchdogSpec.groovy
k6-tests/setup.sh