Bug 5740: Remove Serializable where not necessary
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / RaftActorServerConfigurationSupport.java
index 782ecc06a87ac11b19c6ef6b8335e6a9aa820b1a..0014a6fce716f988a2f96ffe22b3e0ffc5ee6d2b 100644 (file)
@@ -237,7 +237,8 @@ class RaftActorServerConfigurationSupport {
                     operationContext.includeSelfInNewConfiguration(raftActor));
             LOG.debug("{}: New server configuration : {}", raftContext.getId(), payload.getServerConfig());
 
-            raftActor.persistData(operationContext.getClientRequestor(), operationContext.getContextId(), payload);
+            raftActor.persistData(operationContext.getClientRequestor(), operationContext.getContextId(),
+                    payload, false);
 
             currentOperationState = new Persisting(operationContext, newTimer(new ServerOperationTimeout(
                     operationContext.getLoggingContext())));
@@ -627,7 +628,9 @@ class RaftActorServerConfigurationSupport {
         public void initiate() {
             String serverId = getRemoveServerContext().getOperation().getServerId();
             raftContext.removePeer(serverId);
-            ((AbstractLeader)raftActor.getCurrentBehavior()).removeFollower(serverId);
+            AbstractLeader leader = (AbstractLeader)raftActor.getCurrentBehavior();
+            leader.removeFollower(serverId);
+            leader.updateMinReplicaCount();
 
             persistNewServerConfiguration(getRemoveServerContext());
         }