aboutsummaryrefslogtreecommitdiffstats
path: root/cps-ri/src/main/java/org/onap
diff options
context:
space:
mode:
authorToineSiebelink <toine.siebelink@est.tech>2025-01-23 12:34:40 +0000
committerToineSiebelink <toine.siebelink@est.tech>2025-01-23 15:34:05 +0000
commit0cb3dec31d5a42ef00e89038aef1625179c8ac00 (patch)
treeef7028063f090712a3a0692380aecdcf2deb095e /cps-ri/src/main/java/org/onap
parented797d4a340ed145c71ae2cd805b823b26228304 (diff)
Fix for cm handles stuck in LOCKED during registration
- Additional Error logging when cm handles fail module sync - Swallow already defined exception upon schema and/or anchor creation - Updated integration test to try to reproduce the problem (but couldn't) - Ignored integration tests that depend/affected by race conditions (they are useful for troubleshooting but not for pipeline checks) - Removed last remnants of springboot retry annotation option (incl dependencies) Issue-ID: CPS-2576 Change-Id: I910e802268332f955134c043bd1b46a7ec57233b Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Diffstat (limited to 'cps-ri/src/main/java/org/onap')
-rwxr-xr-xcps-ri/src/main/java/org/onap/cps/ri/CpsModulePersistenceServiceImpl.java12
1 files changed, 1 insertions, 11 deletions
diff --git a/cps-ri/src/main/java/org/onap/cps/ri/CpsModulePersistenceServiceImpl.java b/cps-ri/src/main/java/org/onap/cps/ri/CpsModulePersistenceServiceImpl.java
index 4f7492ff26..aaf6165471 100755
--- a/cps-ri/src/main/java/org/onap/cps/ri/CpsModulePersistenceServiceImpl.java
+++ b/cps-ri/src/main/java/org/onap/cps/ri/CpsModulePersistenceServiceImpl.java
@@ -70,8 +70,6 @@ import org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource;
import org.opendaylight.yangtools.yang.parser.api.YangSyntaxErrorException;
import org.opendaylight.yangtools.yang.parser.rfc7950.repo.YangModelDependencyInfo;
import org.springframework.dao.DataIntegrityViolationException;
-import org.springframework.retry.RetryContext;
-import org.springframework.retry.support.RetrySynchronizationManager;
import org.springframework.stereotype.Component;
@Slf4j
@@ -269,18 +267,10 @@ public class CpsModulePersistenceServiceImpl implements CpsModulePersistenceServ
yangResourceRepository.saveAll(newYangResourceEntities);
} catch (final DataIntegrityViolationException dataIntegrityViolationException) {
// Throw a CPS duplicated Yang resource exception if the cause of the error is a yang checksum
- // database constraint violation.
- // If it is not, then throw the original exception
+ // database constraint violation. If it is not, then throw the original exception
final Optional<DuplicatedYangResourceException> convertedException =
convertToDuplicatedYangResourceException(
dataIntegrityViolationException, newYangResourceEntities);
- convertedException.ifPresent(
- e -> {
- final RetryContext retryContext = RetrySynchronizationManager.getContext();
- int retryCount = retryContext == null ? 0 : retryContext.getRetryCount();
- log.warn("Cannot persist duplicated yang resource. System will attempt this method "
- + "up to 5 times. Current retry count : {}", ++retryCount, e);
- });
throw convertedException.isPresent() ? convertedException.get() : dataIntegrityViolationException;
}
}