Fix incorrect last history update 79/55079/4
authorRobert Varga <robert.varga@pantheon.tech>
Sat, 15 Apr 2017 01:37:16 +0000 (03:37 +0200)
committerTom Pantelis <tompantelis@gmail.com>
Tue, 18 Apr 2017 11:17:20 +0000 (11:17 +0000)
This is a thinko -- the codepath will never trigger, eventhough
it should normally trigger all the time.

Change-Id: I29b24a3823c08c64c8c8a74e7be3b96e07672313
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/LeaderFrontendState.java

index 4092685..2b18123 100644 (file)
@@ -137,7 +137,7 @@ final class LeaderFrontendState implements Identifiable<ClientIdentifier> {
         }
 
         // Update last history we have seen
-        if (lastSeenHistory != null && Long.compareUnsigned(lastSeenHistory, id.getHistoryId()) < 0) {
+        if (lastSeenHistory == null || Long.compareUnsigned(lastSeenHistory, id.getHistoryId()) < 0) {
             lastSeenHistory = id.getHistoryId();
         }
 

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