Fix incorrect last history update
[controller.git] / 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
-        if (lastSeenHistory != null && Long.compareUnsigned(lastSeenHistory, id.getHistoryId()) < 0) {
+        if (lastSeenHistory == null || Long.compareUnsigned(lastSeenHistory, id.getHistoryId()) < 0) {
             lastSeenHistory = id.getHistoryId();
         }