Bug-1828 - Raft apply state missing index log should be of type warn and not error 81/11181/1
authorKamal Rameshan <kramesha@cisco.com>
Mon, 15 Sep 2014 05:21:42 +0000 (22:21 -0700)
committerKamal Rameshan <kramesha@cisco.com>
Mon, 15 Sep 2014 05:21:59 +0000 (22:21 -0700)
Change-Id: Iede5050f337fc89e41d5f72c373ace0c2fcce540
Signed-off-by: Kamal Rameshan <kramesha@cisco.com>
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/AbstractRaftActorBehavior.java

index 7e896fe..8644750 100644 (file)
@@ -321,19 +321,19 @@ public abstract class AbstractRaftActorBehavior implements RaftActorBehavior {
                 context.getReplicatedLog().get(i);
 
             if (replicatedLogEntry != null) {
+                // Send a local message to the local RaftActor (it's derived class to be
+                // specific to apply the log to it's index)
                 actor().tell(new ApplyState(clientActor, identifier,
                     replicatedLogEntry), actor());
                 newLastApplied = i;
             } else {
                 //if one index is not present in the log, no point in looping
                 // around as the rest wont be present either
-                context.getLogger().error(
+                context.getLogger().warning(
                     "Missing index {} from log. Cannot apply state. Ignoring {} to {}", i, i, index );
                 break;
             }
         }
-        // Send a local message to the local RaftActor (it's derived class to be
-        // specific to apply the log to it's index)
         context.getLogger().debug("Setting last applied to {}", newLastApplied);
         context.setLastApplied(newLastApplied);
     }