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 409268501a4f5e6914b0ca61f7aadcebe8c35037..2b1812319dc32705818cf8b6bb7e75c55e5648ce 100644 (file)
@@ -137,7 +137,7 @@ final class LeaderFrontendState implements Identifiable<ClientIdentifier> {
         }
 
         // Update last history we have seen
         }
 
         // 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();
         }
 
             lastSeenHistory = id.getHistoryId();
         }