Switch current {ABI,DataStore,Payload}Version to Sodium SR1 09/84709/4
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 25 Sep 2019 14:25:08 +0000 (16:25 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 25 Sep 2019 15:40:19 +0000 (17:40 +0200)
This mass-switches versioned resources to use Sodium SR1 streaming
format.

JIRA: CONTROLLER-1919
Change-Id: Ic712fa04e16c68481eeecccc61d8e6a7dfabac52
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/ABIVersion.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataStoreVersions.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/AbstractVersionedShardDataTreeSnapshot.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/MetadataShardDataTreeSnapshot.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/PayloadVersion.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/persisted/CommitTransactionPayloadTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/persisted/ShardDataTreeSnapshotTest.java

index 90949db..26093c1 100644 (file)
@@ -117,7 +117,7 @@ public enum ABIVersion implements WritableObject {
      * @return Current {@link ABIVersion}
      */
     public static @NonNull ABIVersion current() {
-        return NEON_SR2;
+        return SODIUM_SR1;
     }
 
     /**
index 40f06d1..79eedd3 100644 (file)
@@ -26,7 +26,7 @@ public final class DataStoreVersions {
     public static final short NEON_SR2_VERSION = 10;
     public static final short SODIUM_SR1_VERSION = 11;
     public static final short MAGNESIUM_VERSION = 12;
-    public static final short CURRENT_VERSION = NEON_SR2_VERSION;
+    public static final short CURRENT_VERSION = SODIUM_SR1_VERSION;
 
     private DataStoreVersions() {
 
index 9e6402c..2712b24 100644 (file)
@@ -31,8 +31,8 @@ abstract class AbstractVersionedShardDataTreeSnapshot extends ShardDataTreeSnaps
         final PayloadVersion version = PayloadVersion.readFrom(in);
         switch (version) {
             case BORON:
-                return new ShardSnapshotState(readSnapshot(in), true);
             case NEON_SR2:
+                return new ShardSnapshotState(readSnapshot(in), true);
             case SODIUM_SR1:
             case MAGNESIUM:
                 return new ShardSnapshotState(readSnapshot(in), false);
index 0886d94..e0518a7 100644 (file)
@@ -107,7 +107,7 @@ public class CommitTransactionPayloadTest extends AbstractTest {
     @Test
     public void testCandidateSerialization() throws IOException {
         final CommitTransactionPayload payload = CommitTransactionPayload.create(nextTransactionId(), candidate);
-        assertEquals("payload size", 169, payload.size());
+        assertEquals("payload size", 156, payload.size());
     }
 
     @Test
index 9327f62..5adf2cb 100644 (file)
@@ -48,7 +48,7 @@ public class ShardDataTreeSnapshotTest {
         }
 
         final byte[] bytes = bos.toByteArray();
-        assertEquals(242, bytes.length);
+        assertEquals(236, bytes.length);
 
         ShardDataTreeSnapshot deserialized;
         try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes))) {
@@ -77,7 +77,7 @@ public class ShardDataTreeSnapshotTest {
         }
 
         final byte[] bytes = bos.toByteArray();
-        assertEquals(390, bytes.length);
+        assertEquals(384, bytes.length);
 
         ShardDataTreeSnapshot deserialized;
         try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes))) {

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.