You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "cadonna (via GitHub)" <gi...@apache.org> on 2025/03/11 12:59:49 UTC
[PR] MINOR: Downgrade log messages of swallowed exception to warnings [kafka]
cadonna opened a new pull request, #19185:
URL: https://github.com/apache/kafka/pull/19185
Exceptions that are caught during closing a task dirty are swallowed. The corresponding log messages are on error level which is misleading since the exceptions do not cause any special handling or crash.
This commit downgrades the log messages of swallowed exceptions to warnings and explains in the log messages that the exceptions are swallowed.
--
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: Downgrade log messages of swallowed exception to warnings [kafka]
Posted by "cadonna (via GitHub)" <gi...@apache.org>.
cadonna commented on code in PR #19185:
URL: https://github.com/apache/kafka/pull/19185#discussion_r1989218050
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/TaskManager.java:
##########
@@ -1473,13 +1475,15 @@ private void closeTaskDirty(final Task task, final boolean removeFromTasksRegist
// before suspending and closing the topology
task.prepareCommit();
} catch (final RuntimeException swallow) {
- log.error("Error flushing caches of dirty task {}", task.id(), swallow);
+ log.warn("Error flushing cache of dirty task {}. " +
+ "Since the task is closing dirty, the following exception is swallowed: ", task.id(), swallow);
}
try {
task.suspend();
} catch (final RuntimeException swallow) {
- log.error("Error suspending dirty task {}: {}", task.id(), swallow.getMessage());
+ log.warn("Error suspending dirty task {}. " +
+ "Since the task is closing dirty, the following exception is swallowed: ", task.id(), swallow);
Review Comment:
Maybe it might be better to just log the exception message instead of the whole stacktrace.
WDYT?
--
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: Downgrade log messages of swallowed exception to warnings [kafka]
Posted by "cadonna (via GitHub)" <gi...@apache.org>.
cadonna commented on code in PR #19185:
URL: https://github.com/apache/kafka/pull/19185#discussion_r1989312994
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/TaskManager.java:
##########
@@ -1473,13 +1475,15 @@ private void closeTaskDirty(final Task task, final boolean removeFromTasksRegist
// before suspending and closing the topology
task.prepareCommit();
} catch (final RuntimeException swallow) {
- log.error("Error flushing caches of dirty task {}", task.id(), swallow);
+ log.warn("Error flushing cache of dirty task {}. " +
+ "Since the task is closing dirty, the following exception is swallowed: ", task.id(), swallow);
}
try {
task.suspend();
} catch (final RuntimeException swallow) {
- log.error("Error suspending dirty task {}: {}", task.id(), swallow.getMessage());
+ log.warn("Error suspending dirty task {}. " +
+ "Since the task is closing dirty, the following exception is swallowed: ", task.id(), swallow);
Review Comment:
OK, I replaced the stacktraces with the exception 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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR: Downgrade log messages of swallowed exception to warnings [kafka]
Posted by "cadonna (via GitHub)" <gi...@apache.org>.
cadonna commented on PR #19185:
URL: https://github.com/apache/kafka/pull/19185#issuecomment-2714130497
Call for review: @aliehsaeedii
--
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: Downgrade log messages of swallowed exception to warnings [kafka]
Posted by "cadonna (via GitHub)" <gi...@apache.org>.
cadonna merged PR #19185:
URL: https://github.com/apache/kafka/pull/19185
--
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: Downgrade log messages of swallowed exception to warnings [kafka]
Posted by "bbejeck (via GitHub)" <gi...@apache.org>.
bbejeck commented on code in PR #19185:
URL: https://github.com/apache/kafka/pull/19185#discussion_r1989282679
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/TaskManager.java:
##########
@@ -1473,13 +1475,15 @@ private void closeTaskDirty(final Task task, final boolean removeFromTasksRegist
// before suspending and closing the topology
task.prepareCommit();
} catch (final RuntimeException swallow) {
- log.error("Error flushing caches of dirty task {}", task.id(), swallow);
+ log.warn("Error flushing cache of dirty task {}. " +
+ "Since the task is closing dirty, the following exception is swallowed: ", task.id(), swallow);
}
try {
task.suspend();
} catch (final RuntimeException swallow) {
- log.error("Error suspending dirty task {}: {}", task.id(), swallow.getMessage());
+ log.warn("Error suspending dirty task {}. " +
+ "Since the task is closing dirty, the following exception is swallowed: ", task.id(), swallow);
Review Comment:
+1 to that
--
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