Hi Xinyu, The new leader must be one of the servers having the highest priority. Otherwise, if the new leader does not have the highest priority, it will yield the leadership to a highest priority server soon after it becomes the leader.
If the target server does not have the highest priority, you are right that we need to setConfiguration in order to change the priority. Hope it helps. Tsz-Wo On Mon, Apr 11, 2022 at 10:16 AM Xinyu Tan <[email protected]> wrote: > Hi, Ratis folks > > I'm a developer from Apache IoTDB. I would like to ask how Ratis's > transferLeader interface should be used. > > I found that if I did not adjust the Priority of any replica, any > transferLeader calls would be rejected by the isHighestPriority function. > This makes us need to setConfiguration before and after the > transferLeader to adjust and restore the Priority of the corresponding > node, which is very troublesome. > > I want to confirm that I am using this interface correctly. Is there any > other way to use this interface? > > Thanks! > > Xinyu Tan >
