bbejeck commented on code in PR #16745:
URL: https://github.com/apache/kafka/pull/16745#discussion_r1702163345
##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/RecordCollectorTest.java:
##########
@@ -1800,7 +1900,10 @@ public ProductionExceptionHandlerResponse handle(final
ErrorHandlerContext conte
final
ProducerRecord<byte[], byte[]> record,
final Exception
exception) {
assertInputs(context, exception);
- return response;
+ if (response == null) {
Review Comment:
I don't think the `response` can be null should this be `response.isEmpty`?
##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/RecordDeserializerTest.java:
##########
@@ -212,7 +283,10 @@ public DeserializationHandlerResponse handle(final
ErrorHandlerContext context,
assertEquals(expectedRecord, record);
assertInstanceOf(RuntimeException.class, exception);
assertEquals("KABOOM!", exception.getMessage());
- return response;
+ if (response == null) {
Review Comment:
same as above here
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamTask.java:
##########
@@ -915,6 +917,13 @@ public void punctuate(final ProcessorNode<?, ?, ?, ?> node,
try {
maybeMeasureLatency(() -> punctuator.punctuate(timestamp), time,
punctuateLatencySensor);
+ } catch (final TimeoutException timeoutException) {
Review Comment:
Why a `TimeoutException` here? Could a `punctuate` potentially throw it?
##########
streams/src/main/java/org/apache/kafka/streams/errors/internals/DefaultErrorHandlerContext.java:
##########
@@ -81,6 +81,17 @@ public TaskId taskId() {
return taskId;
}
+ @Override
+ public String toString() {
+ return "ErrorHandlerContext{" +
+ "topic='" + topic + '\'' +
+ ", partition=" + partition +
+ ", offset=" + offset +
+ ", processorNodeId='" + processorNodeId + '\'' +
+ ", taskId=" + taskId +
+ '}';
+ }
Review Comment:
I know it's late in the game to ask this, but what about a timestamp? Just a
thought, I don't have a strong opinion here.
--
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]