funky-eyes opened a new pull request, #7234: URL: https://github.com/apache/incubator-seata/pull/7234
<!-- Please make sure you have read and understood the contributing guidelines --> - [ ] I have registered the PR [changes](../changes). ### Ⅰ. Describe what this PR did When a raft re-election occurs, there may be two leaders on the naming server side: the old leader that unexpectedly went down (since the heartbeat has not yet expired, it has not been removed) and the newly elected leader. It is necessary to filter out the latest leader based on the term to ensure the client correctly connects to the leader node. 当raft发生重选举时,namingserver侧可能存在两个leader,一个是意外宕机的老leader(由于心跳还未到期,所以还没被摘除),一个是新选举的leader,需要根据term去筛选出最新leader,以便client正确连接到leader节点 ### Ⅱ. Does this pull request fix one issue? <!-- If that, add "fixes #xxx" below in the next line, for example, fixes #97. --> ### Ⅲ. Why don't you add test cases (unit test/integration test)? ### Ⅳ. Describe how to verify it ### Ⅴ. Special notes for reviews -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For additional commands, e-mail: notifications-h...@seata.apache.org