From 311b5fa28ae1c9934124c77730e05db9e6f8868f Mon Sep 17 00:00:00 2001 From: sourabh_sourabh Date: Wed, 7 Feb 2024 10:26:33 +0000 Subject: Orphaned modules are removed from the DB before cmhandle removal - changed sequence of delete schema set by cascade to remove unused yang resource modules at last. Issue-ID: CPS-2031 Change-Id: Icefc075165231cc4b9b170e04a2d12af645529e9 Signed-off-by: sourabh_sourabh --- .../src/main/java/org/onap/cps/api/impl/CpsModuleServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cps-service') diff --git a/cps-service/src/main/java/org/onap/cps/api/impl/CpsModuleServiceImpl.java b/cps-service/src/main/java/org/onap/cps/api/impl/CpsModuleServiceImpl.java index 0f9eb3c64f..14b949e5ae 100644 --- a/cps-service/src/main/java/org/onap/cps/api/impl/CpsModuleServiceImpl.java +++ b/cps-service/src/main/java/org/onap/cps/api/impl/CpsModuleServiceImpl.java @@ -117,8 +117,8 @@ public class CpsModuleServiceImpl implements CpsModuleService { final Collection anchorNames = cpsAnchorService.getAnchors(dataspaceName, schemaSetNames) .stream().map(Anchor::getName).collect(Collectors.toSet()); cpsAnchorService.deleteAnchors(dataspaceName, anchorNames); - cpsModulePersistenceService.deleteUnusedYangResourceModules(); cpsModulePersistenceService.deleteSchemaSets(dataspaceName, schemaSetNames); + cpsModulePersistenceService.deleteUnusedYangResourceModules(); for (final String schemaSetName : schemaSetNames) { yangTextSchemaSourceSetCache.removeFromCache(dataspaceName, schemaSetName); } -- cgit 1.2.3-korg