summaryrefslogtreecommitdiffstats
path: root/cps-service/src
diff options
context:
space:
mode:
authorsourabh_sourabh <sourabh.sourabh@est.tech>2024-02-07 10:26:33 +0000
committersourabh_sourabh <sourabh.sourabh@est.tech>2024-02-07 10:26:33 +0000
commit311b5fa28ae1c9934124c77730e05db9e6f8868f (patch)
tree4a39ab4f4c8062c8354723a1c598f00ea8284990 /cps-service/src
parent50a9e57cd4793a541ff8d2ec97a4fb7a7d62b934 (diff)
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 <sourabh.sourabh@est.tech>
Diffstat (limited to 'cps-service/src')
-rw-r--r--cps-service/src/main/java/org/onap/cps/api/impl/CpsModuleServiceImpl.java2
1 files changed, 1 insertions, 1 deletions
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<String> 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);
}