dengziming commented on a change in pull request #10289:
URL: https://github.com/apache/kafka/pull/10289#discussion_r594874464



##########
File path: raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java
##########
@@ -939,12 +951,27 @@ private FetchResponseData buildEmptyFetchResponse(
         );
     }
 
-    private boolean hasValidClusterId(FetchRequestData request) {
+    private boolean hasValidClusterId(ApiMessage request) {

Review comment:
       @jsancio This is simple but not very perfect, consider a four-node 
cluster A-0(clusterId=A) A-1(clusterId=A) B-0(clusterId=B) B-1(clusterId=B), 
when starting, they all become candidate and send vote request to other nodes, 
if they all receive vote response from a node with the same clusterId to itself 
then they will all live, but if all receive vote response from a node with a 
different clusterId they will all be killed. It seems that the logic is similar 
to leader-election which should reach a consensus. So we'd better treat them as 
non-fatal currently and have some discussion to reach a consensus about wheater 
we should treat this as fatal.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to