KAFKA-6739: Ignore the presence of headers when down-converting from V2 to V1/V0#4813
KAFKA-6739: Ignore the presence of headers when down-converting from V2 to V1/V0#4813hachikuji merged 5 commits intoapache:trunkfrom
Conversation
… any header present in the record. Added a test case to verify sanity when down-converting records containing headers.
hachikuji
left a comment
There was a problem hiding this comment.
LGTM. Thanks for the fix!
| for (Record record : recordBatchAndRecords.records) | ||
| builder.append(record); | ||
| for (Record record : recordBatchAndRecords.records) { | ||
| // Down-convert this record. Ignore the presence of headers when down-converting to V0 and V1 (see KAFKA-6739). |
There was a problem hiding this comment.
This is a bit subjective, but I personally prefer to avoid references to tickets unless they have information that is hard to replicate. In this case, the main point is that append will reject a record with headers if the message format doesn't support them, but that it the desired behaviour in this case. So we can just explain it here and the test you added makes sure we don't regress.
There was a problem hiding this comment.
The reason for this is that you get the context without having to load a separate page and it's less likely to become stale as the code moves around (comments get stale, but references to external resources are even worse.)
There was a problem hiding this comment.
I tend to agree. The JIRA doesn't add extra information that the comment itself couldn't provide. I think it's clear enough if we simply mention that we do not include headers since older message format versions don't support them.
Ignore headers when down-converting to V0/V1 since they are not supported. Added a test-case to verify down-conversion sanity in presence of headers. Reviewers: Ismael Juma <ismael@juma.me.uk>, Jason Gustafson <jason@confluent.io>
Ignore headers when down-converting to V0/V1 since they are not supported. Added a test-case to verify down-conversion sanity in presence of headers. Reviewers: Ismael Juma <ismael@juma.me.uk>, Jason Gustafson <jason@confluent.io>
…che#4813) Ignore headers when down-converting to V0/V1 since they are not supported. Added a test-case to verify down-conversion sanity in presence of headers. Reviewers: Ismael Juma <ismael@juma.me.uk>, Jason Gustafson <jason@confluent.io>
* confluent/1.1: (60 commits) MINOR: Fix kafka-run-class for Java 10 (apache#4895) KAFKA-6772: Load credentials from ZK before accepting connections (apache#4867) KAFKA-6742: TopologyTestDriver error when dealing with stores from GlobalKTable MINOR: Mention that -1 disables retention by time (apache#4881) KAFKA-6790: Fix Streams processor node broken link (apache#4874) MINOR: Java 10 fixes so that the build passes (apache#4839) MINOR: Update Jackson to 2.9.5 (apache#4776) MINOR: Downgrade to Gradle 4.5.1 (apache#4791) MINOR: Java 9/10 fixes, gradle and minor deps update (apache#4725) KAFKA-6752: Enable unclean leader election metric (apache#4838) KAFKA-6054: Fix upgrade path from Kafka Streams v0.10.0 (apache#4773) KAFKA-6747 Check whether there is in-flight transaction before aborting transaction (apache#4826) KAFKA-6748: double check before scheduling a new task after the punctuate call (apache#4827) KAFKA-6739; Ignore headers when down-converting from V2 to V0/V1 (apache#4813) KAFKA-6728: Corrected the worker’s instantiation of the HeaderConverter KAFKA-6731: waitOnState should check the state to be the target start. (apache#4808) HOTFIX: Enforce a rebalance upon task migration (apache#4802) MINOR: Remove 1.2.0 changes from streams doc (apache#4784) MINOR: Update version numbers to 1.1.1-SNAPSHOT MINOR: Fix ReassignPartitionsClusterTest.testHwAfterPartitionReassignment test (apache#4781) ...
…che#4813) Ignore headers when down-converting to V0/V1 since they are not supported. Added a test-case to verify down-conversion sanity in presence of headers. Change-Id: Ib32a22b618bff3bea171f0f052390abb13d6d071 Reviewers: Ismael Juma <ismael@juma.me.uk>, Jason Gustafson <jason@confluent.io>
This patch is copied from upstram PR: apache#4813
Because V1/V0 message formats do not expect a header, ignore their presence when down-converting V2 messages that contain headers.
Added a test-case to verify down-conversion sanity in presence of headers.
Committer Checklist (excluded from commit message)