aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/config/embeddedcache/SynchronizationCacheConfigSpec.groovy12
-rw-r--r--cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/config/embeddedcache/TrustLevelCacheConfigSpec.groovy4
-rw-r--r--cps-service/src/main/java/org/onap/cps/cache/HazelcastCacheConfig.java9
-rw-r--r--cps-service/src/test/groovy/org/onap/cps/cache/AnchorDataCacheConfigSpec.groovy4
-rw-r--r--docker-compose/docker-compose.yml2
-rw-r--r--docker-compose/postgres-init.sql1
6 files changed, 16 insertions, 16 deletions
diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/config/embeddedcache/SynchronizationCacheConfigSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/config/embeddedcache/SynchronizationCacheConfigSpec.groovy
index 3b1709d80..6d09df0d4 100644
--- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/config/embeddedcache/SynchronizationCacheConfigSpec.groovy
+++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/config/embeddedcache/SynchronizationCacheConfigSpec.groovy
@@ -69,14 +69,14 @@ class SynchronizationCacheConfigSpec extends Specification {
def dataSyncSemaphoresConfig = Hazelcast.getHazelcastInstanceByName('dataSyncSemaphores').config
def dataSyncSemaphoresMapConfig = dataSyncSemaphoresConfig.mapConfigs.get('dataSyncSemaphoresConfig')
expect: 'system created instance with correct config of Module Sync Work Queue'
- assert moduleSyncDefaultWorkQueueConfig.backupCount == 3
- assert moduleSyncDefaultWorkQueueConfig.asyncBackupCount == 3
+ assert moduleSyncDefaultWorkQueueConfig.backupCount == 1
+ assert moduleSyncDefaultWorkQueueConfig.asyncBackupCount == 0
and: 'Module Sync Started Cm Handle Map has the correct settings'
- assert moduleSyncStartedOnCmHandlesMapConfig.backupCount == 3
- assert moduleSyncStartedOnCmHandlesMapConfig.asyncBackupCount == 3
+ assert moduleSyncStartedOnCmHandlesMapConfig.backupCount == 1
+ assert moduleSyncStartedOnCmHandlesMapConfig.asyncBackupCount == 0
and: 'Data Sync Semaphore Map has the correct settings'
- assert dataSyncSemaphoresMapConfig.backupCount == 3
- assert dataSyncSemaphoresMapConfig.asyncBackupCount == 3
+ assert dataSyncSemaphoresMapConfig.backupCount == 1
+ assert dataSyncSemaphoresMapConfig.asyncBackupCount == 0
and: 'all instances are part of same cluster'
def testClusterName = 'cps-and-ncmp-test-caches'
assert moduleSyncWorkQueueConfig.clusterName == testClusterName
diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/config/embeddedcache/TrustLevelCacheConfigSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/config/embeddedcache/TrustLevelCacheConfigSpec.groovy
index 3eff96d79..c213ab626 100644
--- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/config/embeddedcache/TrustLevelCacheConfigSpec.groovy
+++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/config/embeddedcache/TrustLevelCacheConfigSpec.groovy
@@ -62,8 +62,8 @@ class TrustLevelCacheConfigSpec extends Specification {
when: 'retrieving the map config for trustLevel'
def mapConfig = cacheConfig.mapConfigs.get(hazelcastMapConfigName)
then: 'the map config has the correct backup counts'
- assert mapConfig.backupCount == 3
- assert mapConfig.asyncBackupCount == 3
+ assert mapConfig.backupCount == 1
+ assert mapConfig.asyncBackupCount == 0
where: 'the following caches are used'
scenario | hazelcastInstanceName | hazelcastMapConfigName
'cmhandle map' | 'hazelcastInstanceTrustLevelPerCmHandleMap' | 'trustLevelPerCmHandleCacheConfig'
diff --git a/cps-service/src/main/java/org/onap/cps/cache/HazelcastCacheConfig.java b/cps-service/src/main/java/org/onap/cps/cache/HazelcastCacheConfig.java
index 660176d5e..418de9b17 100644
--- a/cps-service/src/main/java/org/onap/cps/cache/HazelcastCacheConfig.java
+++ b/cps-service/src/main/java/org/onap/cps/cache/HazelcastCacheConfig.java
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START========================================================
- * Copyright (C) 2023 Nordix Foundation
+ * Copyright (C) 2023-2024 Nordix Foundation
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -72,22 +72,19 @@ public class HazelcastCacheConfig {
protected static MapConfig createMapConfig(final String configName) {
final MapConfig mapConfig = new MapConfig(configName);
- mapConfig.setBackupCount(3);
- mapConfig.setAsyncBackupCount(3);
+ mapConfig.setBackupCount(1);
return mapConfig;
}
protected static QueueConfig createQueueConfig(final String configName) {
final QueueConfig commonQueueConfig = new QueueConfig(configName);
- commonQueueConfig.setBackupCount(3);
- commonQueueConfig.setAsyncBackupCount(3);
+ commonQueueConfig.setBackupCount(1);
return commonQueueConfig;
}
protected static SetConfig createSetConfig(final String configName) {
final SetConfig commonSetConfig = new SetConfig(configName);
commonSetConfig.setBackupCount(1);
- commonSetConfig.setAsyncBackupCount(1);
return commonSetConfig;
}
diff --git a/cps-service/src/test/groovy/org/onap/cps/cache/AnchorDataCacheConfigSpec.groovy b/cps-service/src/test/groovy/org/onap/cps/cache/AnchorDataCacheConfigSpec.groovy
index e219945d8..010308c42 100644
--- a/cps-service/src/test/groovy/org/onap/cps/cache/AnchorDataCacheConfigSpec.groovy
+++ b/cps-service/src/test/groovy/org/onap/cps/cache/AnchorDataCacheConfigSpec.groovy
@@ -50,8 +50,8 @@ class AnchorDataCacheConfigSpec extends Specification {
def anchorDataCacheMapConfig = anchorDataCacheConfig.mapConfigs.get('anchorDataCacheMapConfig')
expect: 'system created instance with correct config'
assert anchorDataCacheConfig.clusterName == 'cps-and-ncmp-test-caches'
- assert anchorDataCacheMapConfig.backupCount == 3
- assert anchorDataCacheMapConfig.asyncBackupCount == 3
+ assert anchorDataCacheMapConfig.backupCount == 1
+ assert anchorDataCacheMapConfig.asyncBackupCount == 0
}
def 'Verify deployment network configs for Distributed Caches'() {
diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml
index de427af13..a604b0652 100644
--- a/docker-compose/docker-compose.yml
+++ b/docker-compose/docker-compose.yml
@@ -31,6 +31,8 @@ services:
POSTGRES_DB: cpsdb
POSTGRES_USER: ${DB_USERNAME:-cps}
POSTGRES_PASSWORD: ${DB_PASSWORD:-cps}
+ volumes:
+ - ./postgres-init.sql:/docker-entrypoint-initdb.d/postgres-init.sql
deploy:
resources:
reservations:
diff --git a/docker-compose/postgres-init.sql b/docker-compose/postgres-init.sql
new file mode 100644
index 000000000..0c96de5b5
--- /dev/null
+++ b/docker-compose/postgres-init.sql
@@ -0,0 +1 @@
+ALTER SYSTEM SET shared_buffers = '512MB';