KAFKA-19602: fix(streams): propagate state store names from KTable.transformValues to downstream KTable join#22562
KAFKA-19602: fix(streams): propagate state store names from KTable.transformValues to downstream KTable join#22562wilmerdooley wants to merge 1 commit into
Conversation
…on KTable with extra store Signed-off-by: wilmerdooley <wilmerdooley1@gmail.com>
|
Hello |
|
Thanks, that makes sense. I checked the code path, and I don't see the same issue with The failing path here looks specific to Given that I also noticed the current |
|
Thanks, that helps. I read through KIP-1128 and see the plan to replace KTable.transformValues with the new KTable.processFixedKey on the new Processor API. That method is not in the code yet (KAFKA-17178 is still in progress), so there is nowhere to move this fix to today, and the store-name bug still breaks a downstream KTable join on the released versions while transformValues is around. Happy to keep this small fix available for that window if it is useful, and I understand if you would prefer to handle it as part of the KIP-1128 work instead. |
Change description
When
KTable.transformValuesis called with extra state stores (via thestateStoreNamesparameter) and the result is not materialized, the resultingKTableTransformValuesProcessorSupplierdid not expose those extra stores viastoreNames(). As a result, a downstreamKTablejoin operator had no way to learn about the extra stores and could not wire them through to the join processor, causing initialization to fail withProcessor ... has no access to StateStore ....This change adds a new constructor to
KTableTransformValuesthat accepts thestateStoreNamesand merges them with the parent value getter'sstoreNames()so the full set of stores is reported.KTableImplnow passes thestateStoreNamesit already received to this new constructor. Tests are added inKTableTransformValuesTestandKTableKTableInnerJoinTestto cover both the unit-levelstoreNames()behavior and the end-to-end join scenario from the issue.Testing strategy
Unit tests verify that the
view()storeNames()method ofKTableTransformValuesreturns the union of parent store names and the extrastateStoreNameswhen the result is not materialized. A new integration-style test inKTableKTableInnerJoinTestreproduces the exact scenario from KAFKA-19602: atransformValueson aKTablewith an extra manually-added state store, followed by a self join, which previously failed during topology initialization.JIRA: https://issues.apache.org/jira/browse/KAFKA-19602
Reviewers: Uladzislau Blok blokv75@gmail.com