[
https://issues.apache.org/jira/browse/KAFKA-19022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17938715#comment-17938715
]
Ranganath Samudrala commented on KAFKA-19022:
---------------------------------------------
Agree that
[FetchResponse.json|https://github.com/apache/kafka/blob/31e1a57c41cf9cb600751669dc71bcd9596b45f9/clients/src/main/resources/common/message/FetchResponse.json]
does not have place to store error message as it exists in
[AddRaftVoterResponse.json|https://github.com/apache/kafka/blob/31e1a57c41cf9cb600751669dc71bcd9596b45f9/clients/src/main/resources/common/message/AddRaftVoterResponse.json]
I am not sure when the improvement will be implemented, if it will be
implmented at all. Does this require for us to wait for a major release?
Now, I am wondering how to find the location of the problem in my set up?
> Display cluster IDs being compared when encountering INCONSISTENT_CLUSTER_ID
> error
> ----------------------------------------------------------------------------------
>
> Key: KAFKA-19022
> URL: https://issues.apache.org/jira/browse/KAFKA-19022
> Project: Kafka
> Issue Type: Improvement
> Components: kraft, logging
> Affects Versions: 3.9.0
> Reporter: Ranganath Samudrala
> Assignee: Lorcan
> Priority: Major
>
> While migrating Kafka from zookeeper to kraft, we see errors in logs like
> {{INCONSISTENT_CLUSTER_ID in FETCH response }}
> or
> {{INCONSISTENT_CLUSTER_ID in VOTER response }}
> But cluster IDs being compared is not displayed in logs so there is not
> enough information to see where the issue is. Is the class data *clusterId*
> empty (which could potentially be a bug?) or incoming *clusterId* empty or
> incorrect?
> [KafkaRaftClient|https://github.com/apache/kafka/blob/31e1a57c41cf9cb600751669dc71bcd9596b45f9/raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java#L1459]
> {code:java}
> private boolean hasValidClusterId(String requestClusterId) {
> // We don't enforce the cluster id if it is not provided.
> if (requestClusterId == null)Unknown macro: {
> return true;
> }
> return clusterId.equals(requestClusterId);
> }
> .
> .
> private CompletableFuture<FetchResponseData> handleFetchRequest(
> RaftRequest.Inbound requestMetadata,
> long currentTimeMs
> ) {
> FetchRequestData request = (FetchRequestData) requestMetadata.data();
> if (!hasValidClusterId(request.clusterId())) {
> return completedFuture(new
> FetchResponseData().setErrorCode(Errors.INCONSISTENT_CLUSTER_ID.code()));
> }
> .
> .
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)