C0urante commented on code in PR #15154:
URL: https://github.com/apache/kafka/pull/15154#discussion_r1450932511
##########
connect/runtime/src/test/java/org/apache/kafka/connect/integration/ErrantRecordSinkConnector.java:
##########
@@ -54,7 +65,16 @@ public void put(Collection<SinkRecord> records) {
.computeIfAbsent(rec.topic(), v -> new HashMap<>())
.computeIfAbsent(rec.kafkaPartition(), v -> new
TopicPartition(rec.topic(), rec.kafkaPartition()));
committedOffsets.put(tp, committedOffsets.getOrDefault(tp, 0)
+ 1);
- reporter.report(rec, new Throwable());
+ Throwable error = new Throwable();
+ // Test synchronous and asynchronous reporting, allowing for
re-ordering the errant reports
Review Comment:
Ah, that's true. Can we also verify that the reported records don't include
any duplicates? Would add at least a little more safety here in case
refactoring caused successive calls to `ErrantRecordReporter::report` to
overwrite each other.
--
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]