[ https://issues.apache.org/jira/browse/KAFKA-8428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guozhang Wang resolved KAFKA-8428. ---------------------------------- Resolution: Fixed Fix Version/s: 2.3.0 > Cleanup LogValidator#validateMessagesAndAssignOffsetsCompressed to assume > single record batch only > -------------------------------------------------------------------------------------------------- > > Key: KAFKA-8428 > URL: https://issues.apache.org/jira/browse/KAFKA-8428 > Project: Kafka > Issue Type: Improvement > Reporter: Guozhang Wang > Assignee: Guozhang Wang > Priority: Major > Fix For: 2.3.0 > > > Today, the client -> server record batching protocol works like this: > 1. With magic v2, we always require a single batch within compressed set. And > inside the LogValidator#validateMessagesAndAssignOffsetsCompressed we assume > so already. > 2. With magic v1, our code actually also assumes one record batch, since > whenever inPlaceAssignment is true we assume one batch only; however with > magic v1 it is still possible that inPlaceAssignment == true. > 3. With magic v0, our code does handle the case with multiple record batch, > since with v0 inPlaceAssignment is always false. > This makes the logic of > LogValidator#validateMessagesAndAssignOffsetsCompressed quite twisted and > complicated. > Since all standard clients implementation we've known so far actually all > wrap a single batch with compressed (of course, we cannot guarantee this is > the case for all clients in the wild, but I think the chance of multiple > batches with compressed records should really be rare), I think it's better > just to make it as a universal requirement for all versions. -- This message was sent by Atlassian JIRA (v7.6.3#76005)