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)
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>

No differences found