KAFKA-10049: Fixed FKJ bug where wrapped serdes are set incorrectly when using default StreamsConfig serdes#8764
Conversation
vvcephei
left a comment
There was a problem hiding this comment.
Thanks, @bellemare , just a high-level question about the testing strategy.
guozhangwang
left a comment
There was a problem hiding this comment.
@bellemare could you point to me which line is the actual fix?
|
test this please |
There was a problem hiding this comment.
@guozhangwang This is 1/2 of the areas that needed the fix. The valueSerde was being passed into the underlying Serde, despite it really needing the keySerde.
|
Updated KTableKTableForeignKeyJoinScenarioTest from (String,String) to (Integer,String). This would have caught this particular bug. Reverted the JSON-related test since it's not essential for our coverage. |
|
Test this please |
|
Thanks, @bellemare ! I'll give it a look today. |
|
Looks like checkstyle failed. I may submit a patch, just to get the tests running. |
vvcephei
left a comment
There was a problem hiding this comment.
Thanks for the update, @bellemare ! Just a couple of minor comments on the tests, but it looks great overall.
There was a problem hiding this comment.
Might be nice for demonstration purposes if the two records actually have different keys. Maybe:
| aTopic.pipeInput(1, "1-alpha"); | |
| bTopic.pipeInput(1, "beta"); | |
| aTopic.pipeInput(1, "999-alpha"); | |
| bTopic.pipeInput(999, "beta"); |
There was a problem hiding this comment.
Agreed. Good catch.
There was a problem hiding this comment.
bump (it looks like this didn't get changed)
There was a problem hiding this comment.
I swear I know how to read... T_T
|
Ok, since I had a couple of small requests, I won't push a fix for the checkstyle errors. In case they're gone by the time you come back to this, it was: By the way, if you run |
…hen using default StreamsConfig serdes
|
I swear it ran checkstyle when I compiled it... bah! I guess not. I did run ./gradlew :streams:test it had one unrelated error (I think) so lets see how it does now. |
|
Test this please |
1 similar comment
|
Test this please |
|
retest this please |
|
retest this please |
|
Test this please |
1 similar comment
|
Test this please |
|
Test this please |
1 similar comment
|
Test this please |
|
Hey @bellemare , Thanks so much for the update! Jenkins has been a bit lazy recently, so I'll probably be pinging it for a while... |
|
Ah, there we go :) |
|
I've noticed that if you complain, you tend to get results... |
|
All the test failures were |
|
Thanks John! |
|
Np, Thanks for the fix, @bellemare ! |
…hen using default StreamsConfig serdes (#8764) Bug Details: Mistakenly setting the value serde to the key serde for an internal wrapped serde in the FKJ workflow. Testing: Modified the existing test to reproduce the issue, then verified that the test passes. Reviewers: Guozhang Wang <wangguoz@gmail.com>, John Roesler <vvcephei@apache.org>
…hen using default StreamsConfig serdes (#8764) Bug Details: Mistakenly setting the value serde to the key serde for an internal wrapped serde in the FKJ workflow. Testing: Modified the existing test to reproduce the issue, then verified that the test passes. Reviewers: Guozhang Wang <wangguoz@gmail.com>, John Roesler <vvcephei@apache.org>
|
Cherry-picked to 2.6 and 2.5 |
* 'trunk' of github.com:apache/kafka: (42 commits) HOTFIX: Fix compile error in TopicAdminTest (apache#8866) KAFKA-10144: clean up corrupted standby tasks before attempting a commit (apache#8849) KAFKA-10157: Fix broken tests due to InterruptedException from FinalizedFeatureChangeListener (apache#8857) KAFKA-9432: automated protocol for DescribeConfigs (apache#8312) KAFKA-10049: Fixed FKJ bug where wrapped serdes are set incorrectly when using default StreamsConfig serdes (apache#8764) KAFKA-10027: Implement read path for feature versioning system (KIP-584) (apache#8680) KAFKA-10085: correctly compute lag for optimized source changelogs (apache#8787) KAFKA-10086: Integration test for ensuring warmups are effective (apache#8818) KAFKA-9374: Make connector interactions asynchronous (apache#8069) MINOR: reduce sizeInBytes for percentiles metrics (apache#8835) KAFKA-10115: Incorporate errors.tolerance with the Errant Record Reporter (apache#8829) KAFKA-9216: Enforce that Connect’s internal topics use `compact` cleanup policy (apache#8828) KAFKA-9845: Warn users about using config providers with plugin.path property (apache#8455) KAFKA-7833: Add missing test (apache#8847) KAFKA-9066: Retain metrics for failed tasks (apache#8502) KAFKA-9841: Revoke duplicate connectors and tasks when zombie workers return with an outdated assignment (apache#8453) KAFKA-9985: Sink connector may exhaust broker when writing in DLQ (apache#8663) KAFKA-9441: remove prepareClose() to simplify task management (apache#8833) KAFKA-7833: Add Global/StateStore name conflict check (apache#8825) KAFKA-9969: Exclude ConnectorClientConfigRequest from class loading isolation (apache#8630) ...
…t-for-generated-requests * apache-github/trunk: (248 commits) KAFKA-10049: Fixed FKJ bug where wrapped serdes are set incorrectly when using default StreamsConfig serdes (apache#8764) KAFKA-10027: Implement read path for feature versioning system (KIP-584) (apache#8680) KAFKA-10085: correctly compute lag for optimized source changelogs (apache#8787) KAFKA-10086: Integration test for ensuring warmups are effective (apache#8818) KAFKA-9374: Make connector interactions asynchronous (apache#8069) MINOR: reduce sizeInBytes for percentiles metrics (apache#8835) KAFKA-10115: Incorporate errors.tolerance with the Errant Record Reporter (apache#8829) KAFKA-9216: Enforce that Connect’s internal topics use `compact` cleanup policy (apache#8828) KAFKA-9845: Warn users about using config providers with plugin.path property (apache#8455) KAFKA-7833: Add missing test (apache#8847) KAFKA-9066: Retain metrics for failed tasks (apache#8502) KAFKA-9841: Revoke duplicate connectors and tasks when zombie workers return with an outdated assignment (apache#8453) KAFKA-9985: Sink connector may exhaust broker when writing in DLQ (apache#8663) KAFKA-9441: remove prepareClose() to simplify task management (apache#8833) KAFKA-7833: Add Global/StateStore name conflict check (apache#8825) KAFKA-9969: Exclude ConnectorClientConfigRequest from class loading isolation (apache#8630) KAFKA-9991: Fix flaky unit tests (apache#8843) KAFKA-10014; Always try to close all channels in Selector#close (apache#8685) KAFKA-10079: improve thread-level stickiness (apache#8775) MINOR: Print all removed dynamic members during join complete (apache#8816) ...
Bug Details:
Mistakenly setting the value serde to the key serde for an internal wrapped serde in the FKJ workflow.
Testing:
Added integration test to use a non-primitive Serde, in this case the JSONSerde that the original bug finder reported using. Expanded integration test to ensure that the default Serdes work for the entire happy path of the FKJ.
Introduces a testing dependency on com.fasterxml.jackson, though this is already the case in other modules so I suspect it won't be a big issue.
Committer Checklist (excluded from commit message)