Fix the inner order of switchBehavior in RaftAcotr 44/67144/2
author何运波10202176 <he.yunbo@zte.com.cn>
Mon, 15 Jan 2018 01:32:32 +0000 (09:32 +0800)
committerTom Pantelis <tompantelis@gmail.com>
Thu, 25 Jan 2018 00:28:55 +0000 (00:28 +0000)
commit387c19a06cbcde2e258a2f8b6338898a8bc3ba74
treecfac3152b3f9e9c479b8dfae13c088243e373ea8
parente9fc7e7ed2b13d274518d6a872ab67749ef4507a
Fix the inner order of switchBehavior in RaftAcotr
updateAndPersist should be called before switchBehavior.
Otherwise, when the EntityOwnershipShard trigger a new write transaction
in onLeaderChanged base on last term, It will lead to fail in this
transaction because of the term value is inconsistent between AppendEntries
and AppendEntriesReply

Change-Id: I9118f7ec283f23e02dc285ccf6a3fbbce47dc508
Signed-off-by: HeYunBo <he.yunbo@zte.com.cn>
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActor.java [changed mode: 0644->0755]