Change remaining SnapshotSelectionCriteria to prioritize timestamp 17/83017/2
authorTomas Cere <tomas.cere@pantheon.tech>
Thu, 11 Jul 2019 10:19:47 +0000 (12:19 +0200)
committerRobert Varga <nite@hq.sk>
Mon, 15 Jul 2019 15:21:37 +0000 (15:21 +0000)
These are also needed and were missed in the original run-through.

Change-Id: Icede0673c580f793ffe81ccecf728c15dc6e83ca
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/SavingClientActorBehavior.java
opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/gossip/BucketStoreActor.java

index 8f6e991..58a1077 100644 (file)
@@ -39,7 +39,7 @@ final class SavingClientActorBehavior extends RecoveredClientActorBehavior<Initi
         } else if (command instanceof SaveSnapshotSuccess) {
             LOG.debug("{}: got command: {}", persistenceId(), command);
             SaveSnapshotSuccess saved = (SaveSnapshotSuccess)command;
-            context().deleteSnapshots(new SnapshotSelectionCriteria(saved.metadata().sequenceNr(),
+            context().deleteSnapshots(new SnapshotSelectionCriteria(scala.Long.MaxValue(),
                     saved.metadata().timestamp() - 1, 0L, 0L));
             return this;
         } else if (command instanceof DeleteSnapshotsSuccess) {
index 2b07d1b..6c5ca77 100644 (file)
@@ -180,7 +180,7 @@ public abstract class BucketStoreActor<T extends BucketData<T>> extends
         } else if (message instanceof SaveSnapshotSuccess) {
             LOG.debug("{}: got command: {}", persistenceId(), message);
             SaveSnapshotSuccess saved = (SaveSnapshotSuccess)message;
-            deleteSnapshots(new SnapshotSelectionCriteria(saved.metadata().sequenceNr(),
+            deleteSnapshots(new SnapshotSelectionCriteria(scala.Long.MaxValue(),
                     saved.metadata().timestamp() - 1, 0L, 0L));
             persisting = false;
             unstash();

©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.