[ https://issues.apache.org/jira/browse/KAFKA-12815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17348646#comment-17348646 ]
A. Sophie Blee-Goldman commented on KAFKA-12815: ------------------------------------------------ Ack, sorry I made a bad assumption about how FKJ are implemented internally. I wasn't the one to review them Given the limited scope of this bug I would say it feels appropriate to just fix in trunk for now, and file a followup ticket pointing out this bug/as an improvement to tighten up the processor context contract w.r.t topic() and offset(). If there are users currently out there for whom this is an essential feature, it will be pretty obvious once their apps start failing with an NPE, and they will probably let us know. We can re-evaluate whether to do a "full fix" if/when user reports come in > KTable.transformValue might have incorrect record metadata > ---------------------------------------------------------- > > Key: KAFKA-12815 > URL: https://issues.apache.org/jira/browse/KAFKA-12815 > Project: Kafka > Issue Type: Bug > Components: streams > Reporter: Matthias J. Sax > Assignee: Matthias J. Sax > Priority: Major > Fix For: 3.0.0 > > > In the DSL, Kafka Streams applies an optimization for non-materialized > tables: when these are queried an upstream state store is accessed. To ensure > that the correct value is returned from the lookup, all intermediate > processors after the materialized store, and before the processor that > triggers the lookup are re-applied (cf `KTableValueGetter`). > For re-applying DSL operators like filter/mapValues that works fine. However, > for transformValue(), the method is executed with the incorrect > `RecordContext` (note that DSL operators like filter don't have access to the > `RecordContext` and thus, are not subject to this bug). Instead of using the > record context from the value that was received from the upstream state store > (and that is re-processed), the transformer would see the context from the > record that triggered the lookup. > Thus, the information about timestamp, offset, partition, topic name, and > headers is incorrect. -- This message was sent by Atlassian Jira (v8.3.4#803005)