showuon commented on PR #20859: URL: https://github.com/apache/kafka/pull/20859#issuecomment-3594404590
> @showuon, the active controller can distinguish between a auto-join AddVoter request and a manual AddVoter request because of https://cwiki.apache.org/confluence/display/KAFKA/KIP-1186%3A+Update+AddRaftVoterRequest+RPC+to+support+auto-join. This KIP was needed as part of the initial implementation to make auto-join fully available. When a ReplicaKey auto-joins and is then manually removed, it will no longer auto-join again, but you can still add it manually. Hopefully that clears things up. Thanks for the update, @kevin-wu24 ! That looks good. I have another thought. How about the `auto-join` is only allowed when the node _firstly_ start up. Basically, the purpose of the auto-join is to allow a node to easily join the voters after storage formatting, right? Then, we can easily check the `log end offset == 0 in metadata log` in `kakfaRaftClient#initialize()` in the client side. If LEO is 0, we know this node is a brand new node, we will auto-join it if `auto-join is enabled`. Otherwise, we won't do that. Is this much clear to resolve this solution? -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
