KAFKA-9080: Addresses MessageFormatChangeTest.testCompatibilty with version 0.9.0.1#7628
KAFKA-9080: Addresses MessageFormatChangeTest.testCompatibilty with version 0.9.0.1#7628tuvtran wants to merge 3 commits intoapache:trunkfrom
Conversation
|
All |
|
@omkreddy @guozhangwang ready for reviews |
|
@tuvtran I took a look at the PR but still cannot understand why for V0/V1 continuous offsets no longer hold true: with V0/V1 the inner records use the base offset + relative offset which should also be continuous, right? |
|
@tuvtran : Looking at the logic in DeepRecordsIterator, it seems there is a difference btw V0 and V1 message format. In V1, the wrapper message has the absolute base offset and each inner message has the relative offset. In V0, each inner message has the absolute offset and the offset in the wrapper message is ignored. So, we need to distinguish between these 2 cases during offset validation. |
|
Can we revert the check added in assignOffsetsNonCompressed ?, so that we can continue with existing behavior in 2.4. We can add complete fix in next release. |
|
Yeah I can create a separate JIRA for V0/V1 offset validation. |
This reverts commit def0713.
|
retest this please |
What confused me here is that, in either V0, V1 or V2 case, the inner message offset (either it is inferred as base + relative, or it is encoded as absolute) should always be continuous right? @junrao @tuvtran |
|
@guozhangwang : It seems the issue is that expectedInnerOffset always starts at offset 0. This will fail the test |
…batch does have continuous incremental offsets #7167 added a check for non-incremental offsets in `assignOffsetsNonCompressed`, which is not applicable for message format V0 and V1. Therefore, I added a condition to disable the check if the record version precedes V2. Author: Tu Tran <tu@confluent.io> Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com> Closes #7628 from tuvtran/KAFKA-9080
|
Can we make sure to include a unit test that verifies this fix? Generally, we should aim to do that before merging. |
That makes sense, thanks! |
…batch does have continuous incremental offsets apache#7167 added a check for non-incremental offsets in `assignOffsetsNonCompressed`, which is not applicable for message format V0 and V1. Therefore, I added a condition to disable the check if the record version precedes V2. Author: Tu Tran <tu@confluent.io> Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com> Closes apache#7628 from tuvtran/KAFKA-9080
#7167 added a check for non-incremental offsets in
assignOffsetsNonCompressed, which is not applicable for message format V0 and V1. Therefore, I added a condition to disable the check if the record version precedes V2.Committer Checklist (excluded from commit message)