Upgrade Atomix dependency version to 2.0.2
Change-Id: I6559beff9cc49768aa07d7e08e84eabd96ecb862
diff --git a/core/store/primitives/pom.xml b/core/store/primitives/pom.xml
index 544be38..88f30a5 100644
--- a/core/store/primitives/pom.xml
+++ b/core/store/primitives/pom.xml
@@ -70,7 +70,7 @@
<dependency>
<groupId>io.atomix</groupId>
<artifactId>atomix</artifactId>
- <version>2.0.0</version>
+ <version>2.0.2</version>
</dependency>
<dependency>
diff --git a/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/StoragePartitionServer.java b/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/StoragePartitionServer.java
index 6028685..36b854f 100644
--- a/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/StoragePartitionServer.java
+++ b/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/StoragePartitionServer.java
@@ -16,6 +16,7 @@
package org.onosproject.store.primitives.impl;
import java.io.File;
+import java.time.Duration;
import java.util.Collection;
import java.util.concurrent.CompletableFuture;
import java.util.function.Supplier;
@@ -41,6 +42,9 @@
private static final int MAX_ENTRIES_PER_LOG_SEGMENT = 32768;
private static final int MAX_SEGMENT_SIZE = 1024 * 1024 * 64;
+ private static final long ELECTION_TIMEOUT_MILLIS = 2500;
+ private static final long HEARTBEAT_INTERVAL_MILLIS = 1000;
+
private final MemberId localMemberId;
private final StoragePartition partition;
private final Supplier<RaftServerProtocol> protocol;
@@ -98,8 +102,10 @@
RaftServer.Builder builder = RaftServer.newBuilder(localMemberId)
.withName("partition-" + partition.getId())
.withProtocol(protocol.get())
+ .withElectionTimeout(Duration.ofMillis(ELECTION_TIMEOUT_MILLIS))
+ .withHeartbeatInterval(Duration.ofMillis(HEARTBEAT_INTERVAL_MILLIS))
.withStorage(RaftStorage.newBuilder()
- .withStorageLevel(StorageLevel.DISK)
+ .withStorageLevel(StorageLevel.MAPPED)
.withSerializer(new AtomixSerializerAdapter(Serializer.using(StorageNamespaces.RAFT_STORAGE)))
.withDirectory(dataFolder)
.withMaxEntriesPerSegment(MAX_ENTRIES_PER_LOG_SEGMENT)
diff --git a/features/features.xml b/features/features.xml
index c95b3a9..e920ab0 100644
--- a/features/features.xml
+++ b/features/features.xml
@@ -59,7 +59,7 @@
<bundle>mvn:com.typesafe/config/1.2.1</bundle>
<bundle>mvn:com.googlecode.concurrent-trees/concurrent-trees/2.6.0</bundle>
<bundle>mvn:commons-io/commons-io/2.4</bundle>
- <bundle>mvn:io.atomix/atomix/2.0.0</bundle>
+ <bundle>mvn:io.atomix/atomix/2.0.2</bundle>
<bundle>mvn:org.glassfish.jersey.core/jersey-client/2.25.1</bundle>
diff --git a/lib/BUCK b/lib/BUCK
index 1ca9fbb..c4d7137 100644
--- a/lib/BUCK
+++ b/lib/BUCK
@@ -1,4 +1,4 @@
-# ***** This file was auto-generated at Sun, 3 Sep 2017 12:12:12 GMT. Do not edit this file manually. *****
+# ***** This file was auto-generated at Wed, 13 Sep 2017 00:20:11 GMT. Do not edit this file manually. *****
# ***** Use onos-lib-gen *****
pass_thru_pom(
@@ -208,10 +208,10 @@
remote_jar (
name = 'atomix',
- out = 'atomix-2.0.0.jar',
- url = 'mvn:io.atomix:atomix:jar:2.0.0',
- sha1 = '44b1271a4a77d9831b000f2eedf52587969ae9fb',
- maven_coords = 'io.atomix:atomix:2.0.0',
+ out = 'atomix-2.0.2.jar',
+ url = 'mvn:io.atomix:atomix:jar:2.0.2',
+ sha1 = '9b3b05af6337c35bc69922fb7b535c78f07a5f5b',
+ maven_coords = 'io.atomix:atomix:2.0.2',
visibility = [ 'PUBLIC' ],
)
diff --git a/lib/deps.json b/lib/deps.json
index 7ed72bc..b199910 100644
--- a/lib/deps.json
+++ b/lib/deps.json
@@ -118,7 +118,7 @@
"aopalliance-repackaged": "mvn:org.glassfish.hk2.external:aopalliance-repackaged:2.5.0-b32",
"amqp-client": "mvn:com.rabbitmq:amqp-client:jar:3.6.1",
"asm": "mvn:org.ow2.asm:asm:5.0.4",
- "atomix": "mvn:io.atomix:atomix:2.0.0",
+ "atomix": "mvn:io.atomix:atomix:2.0.2",
"commons-codec": "mvn:commons-codec:commons-codec:1.10",
"commons-collections": "mvn:commons-collections:commons-collections:3.2.2",
"commons-configuration": "mvn:commons-configuration:commons-configuration:1.10",