You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "smjn (via GitHub)" <gi...@apache.org> on 2025/07/24 10:18:49 UTC
[PR] MINOR: Prevent error message swallow in persister. [kafka]
smjn opened a new pull request, #20238:
URL: https://github.com/apache/kafka/pull/20238
* The persister receives the response from the share coordinator and performs various actions based on the response error code.
* There was an issue in handling the error code and error message. We were creating an Error object from the error code in the response but not looking at the error message in the response.
* In some cases where a standard code has a custom associated message - this will not provide complete information in the logs.
* In this PR, we rectify the situation by first checking the error message in response and if empty, getting the standard message from Errors object.
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR: Prevent error message swallow in persister. [kafka]
Posted by "apoorvmittal10 (via GitHub)" <gi...@apache.org>.
apoorvmittal10 merged PR #20238:
URL: https://github.com/apache/kafka/pull/20238
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR: Prevent error message swallow in persister. [kafka]
Posted by "AndrewJSchofield (via GitHub)" <gi...@apache.org>.
AndrewJSchofield commented on code in PR #20238:
URL: https://github.com/apache/kafka/pull/20238#discussion_r2228115554
##########
server-common/src/main/java/org/apache/kafka/server/share/persister/PersisterStateManager.java:
##########
@@ -467,7 +471,7 @@ protected void handleFindCoordinatorResponse(ClientResponse response) {
default:
log.error("Unable to find coordinator for {} using key {}.", name(), partitionKey());
- findCoordinatorErrorResponse(error, null);
+ findCoordinatorErrorResponse(error, new Exception(errMessage));
Review Comment:
Why did you choose to pass the error message for this case but not the other RPCs? I would have expected consistent failing in all cases.
##########
server-common/src/main/java/org/apache/kafka/server/share/persister/PersisterStateManager.java:
##########
@@ -437,6 +437,10 @@ protected void handleFindCoordinatorResponse(ClientResponse response) {
FindCoordinatorResponseData.Coordinator coordinatorData = coordinators.get(0);
Errors error = Errors.forCode(coordinatorData.errorCode());
+ String errMessage = coordinatorData.errorMessage();
Review Comment:
nit: `errorMessage` has been used in the other cases.
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR: Prevent error message swallow in persister. [kafka]
Posted by "smjn (via GitHub)" <gi...@apache.org>.
smjn commented on code in PR #20238:
URL: https://github.com/apache/kafka/pull/20238#discussion_r2228122634
##########
server-common/src/main/java/org/apache/kafka/server/share/persister/PersisterStateManager.java:
##########
@@ -467,7 +471,7 @@ protected void handleFindCoordinatorResponse(ClientResponse response) {
default:
log.error("Unable to find coordinator for {} using key {}.", name(), partitionKey());
- findCoordinatorErrorResponse(error, null);
+ findCoordinatorErrorResponse(error, new Exception(errMessage));
Review Comment:
Will update
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR: Prevent error message swallow in persister. [kafka]
Posted by "AndrewJSchofield (via GitHub)" <gi...@apache.org>.
AndrewJSchofield commented on code in PR #20238:
URL: https://github.com/apache/kafka/pull/20238#discussion_r2228117841
##########
server-common/src/main/java/org/apache/kafka/server/share/persister/PersisterStateManager.java:
##########
@@ -437,6 +437,10 @@ protected void handleFindCoordinatorResponse(ClientResponse response) {
FindCoordinatorResponseData.Coordinator coordinatorData = coordinators.get(0);
Errors error = Errors.forCode(coordinatorData.errorCode());
+ String errMessage = coordinatorData.errorMessage();
Review Comment:
I see you fixed this in the next commit.
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR: Prevent error message swallow in persister. [kafka]
Posted by "smjn (via GitHub)" <gi...@apache.org>.
smjn commented on code in PR #20238:
URL: https://github.com/apache/kafka/pull/20238#discussion_r2228123267
##########
server-common/src/main/java/org/apache/kafka/server/share/persister/PersisterStateManager.java:
##########
@@ -437,6 +437,10 @@ protected void handleFindCoordinatorResponse(ClientResponse response) {
FindCoordinatorResponseData.Coordinator coordinatorData = coordinators.get(0);
Errors error = Errors.forCode(coordinatorData.errorCode());
+ String errMessage = coordinatorData.errorMessage();
Review Comment:
State file
##########
server-common/src/main/java/org/apache/kafka/server/share/persister/PersisterStateManager.java:
##########
@@ -437,6 +437,10 @@ protected void handleFindCoordinatorResponse(ClientResponse response) {
FindCoordinatorResponseData.Coordinator coordinatorData = coordinators.get(0);
Errors error = Errors.forCode(coordinatorData.errorCode());
+ String errMessage = coordinatorData.errorMessage();
Review Comment:
Stale file
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org