Enhancing intent-perf logging
Fixing defect in distributed app mgmt
Reducing DB manager heartbeat aggressiveness
Change-Id: I9ba948a2b2166625c56566502143c0d27f9a2c44
diff --git a/core/common/src/main/java/org/onosproject/common/app/ApplicationArchive.java b/core/common/src/main/java/org/onosproject/common/app/ApplicationArchive.java
index 5a818e4..9003f0d 100644
--- a/core/common/src/main/java/org/onosproject/common/app/ApplicationArchive.java
+++ b/core/common/src/main/java/org/onosproject/common/app/ApplicationArchive.java
@@ -148,7 +148,7 @@
* archive stream or store
* the application archive
*/
- public ApplicationDescription saveApplication(InputStream stream) {
+ public synchronized ApplicationDescription saveApplication(InputStream stream) {
try (InputStream ais = stream) {
byte[] cache = toByteArray(ais);
InputStream bis = new ByteArrayInputStream(cache);
@@ -190,7 +190,7 @@
*
* @param appName application name
*/
- public void purgeApplication(String appName) {
+ public synchronized void purgeApplication(String appName) {
File appDir = new File(appsDir, appName);
try {
Tools.removeDirectory(appDir);
@@ -209,7 +209,7 @@
* @param appName application name
* @return application archive stream
*/
- public InputStream getApplicationInputStream(String appName) {
+ public synchronized InputStream getApplicationInputStream(String appName) {
try {
File appFile = appFile(appName, appName + ".zip");
return new FileInputStream(appFile.exists() ? appFile : appFile(appName, APP_XML));
diff --git a/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/DatabaseManager.java b/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/DatabaseManager.java
index 2df9b4c..1a2758b 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/DatabaseManager.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/DatabaseManager.java
@@ -104,8 +104,8 @@
.withReceiveBufferSize(32768)
.withSendBufferSize(8192)
.withThreads(1))
- .withElectionTimeout(300)
- .withHeartbeatInterval(150)
+ .withElectionTimeout(3000)
+ .withHeartbeatInterval(1500)
.withMembers(activeNodeUris)
.withLocalMember(localNodeUri);
@@ -114,8 +114,8 @@
partitionMap.forEach((name, nodes) -> {
Set<String> replicas = nodes.stream().map(this::nodeToUri).collect(Collectors.toSet());
DatabaseConfig partitionConfig = new DatabaseConfig()
- .withElectionTimeout(300)
- .withHeartbeatInterval(150)
+ .withElectionTimeout(3000)
+ .withHeartbeatInterval(1500)
.withConsistency(Consistency.STRONG)
.withLog(new FileLog()
.withDirectory(logDir)