> 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.
Hi, Thank you for your reply. I have another question for your answer: If the leader has been successfully transferred, do I need to adjust the priority back? If not, what should I do next time to transfer the leader? Do I need to continue to increase priority? If I transfer the leader N times, does this indicate that there is a node whose priority is greater than N? Xinyu Tan > 在 2022年4月11日,下午8:18,Tsz Wo Sze <[email protected]> 写道: > > 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] > <mailto:[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
