mjsax commented on a change in pull request #10720:
URL: https://github.com/apache/kafka/pull/10720#discussion_r635608454
##########
File path:
streams/src/main/java/org/apache/kafka/streams/kstream/internals/KTableTransformValues.java
##########
@@ -141,16 +144,32 @@ public void close() {
@Override
public void init(final ProcessorContext context) {
+ internalProcessorContext = (InternalProcessorContext) context;
parentGetter.init(context);
valueTransformer.init(new
ForwardingDisabledProcessorContext(context));
}
@Override
public ValueAndTimestamp<V1> get(final K key) {
final ValueAndTimestamp<V> valueAndTimestamp =
parentGetter.get(key);
- return ValueAndTimestamp.make(
+
+ final ProcessorRecordContext currentContext =
internalProcessorContext.recordContext();
+
+ internalProcessorContext.setRecordContext(new
ProcessorRecordContext(
Review comment:
> This behavior change might be ok on the grounds that the context we
previously provided was actually incorrect, though
Agreed. Also note, that the JavaDocs of `RecordContext` state, that
`topic()` might return `null` if it's not available. Of course, user might not
know why it's not available and it might be worth to point this out for this
case. During regular processing, it's a sane assumption that the context
information will always be available.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]