vvcephei commented on a change in pull request #11099:
URL: https://github.com/apache/kafka/pull/11099#discussion_r678766661
##########
File path:
streams/src/main/java/org/apache/kafka/streams/kstream/internals/KTableSource.java
##########
@@ -92,33 +98,62 @@ public void init(final
org.apache.kafka.streams.processor.ProcessorContext conte
}
@Override
- public void process(final K key, final V value) {
+ public void process(final Record<KIn, VIn> record) {
// if the key is null, then ignore the record
- if (key == null) {
- LOG.warn(
- "Skipping record due to null key. topic=[{}]
partition=[{}] offset=[{}]",
- context().topic(), context().partition(),
context().offset()
- );
+ if (record.key() == null) {
+ if (context.recordMetadata().isPresent()) {
+ final RecordMetadata recordMetadata =
context.recordMetadata().get();
+ LOG.warn(
+ "Skipping record due to null key. "
+ + "value=[{}] topic=[{}] partition=[{}]
offset=[{}]",
Review comment:
Aha! That's an excellent find. We did make a pass and remove them all at
some point, but they seem to have come back. I'm ashamed to admit that I
reviewed some of those files and didn't notice it.
--
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]