smjn commented on code in PR #20884:
URL: https://github.com/apache/kafka/pull/20884#discussion_r2527060090
##########
server-common/src/main/java/org/apache/kafka/server/share/persister/PersisterStateManager.java:
##########
@@ -399,14 +401,24 @@ public void onComplete(ClientResponse response) {
}
// Visibility for testing
- Optional<Errors> checkNetworkError(ClientResponse response,
BiConsumer<Errors, Exception> errorConsumer) {
+ Optional<Errors> checkResponseError(ClientResponse response,
BiConsumer<Errors, Exception> errorConsumer) {
if (response.hasResponse()) {
return Optional.empty();
}
- log.debug("Response for RPC {} with key {} is invalid - {}.",
name(), this.partitionKey, response);
-
- if (response.wasDisconnected()) {
+ log.debug("Response for RPC {} with key {} is invalid - {}",
name(), this.partitionKey, response);
+
+ if (response.authenticationException() != null) {
+ log.error("Authentication exception",
response.authenticationException());
+ Errors error =
Errors.forException(response.authenticationException());
+ errorConsumer.accept(error, new
AuthenticationException(String.format("Server response for %s indicates
authentication exception.", this.partitionKey)));
+ return Optional.of(error);
Review Comment:
@apoorvmittal10
We will propagate the message like in other cases.
```
Error in read state RPC. Server response for
SharePartitionKey{groupId=group1,
topicIdPartition=YJ3W0zFZSoyslIZLI5033A:null-10} indicates version mismatch.
```
This is the same case with other RPCs. The message is in line with other
error response messages.
--
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]