smjn opened a new pull request, #22662:
URL: https://github.com/apache/kafka/pull/22662

   Current code in `ShareGroupDLQStateManager.coalesceProduceRequests` combined 
requests by appending records in a list. For example, consider 2 DLQ requests 
`r1` and `r2`:
   ```
   r1: (DLQPartition: 0, records: [a, b, c]),
   r2: (DLQPartition: 0, records: [p, q, q])
   
   would result in 
   
   produce request: (...., partitionData: [
     (0, [a,b,c]),
     (0, [p,q,r])
   ]
   ```
   
   This is incorrect as the API will only look at the first entry and ignore 
`(0, [p,q,r])`. To fix this the merged request should be:
   ```
   produce request: (...., partitionData: [
     (0, [a,b,c,p,q,r])
   ]
   ```
   Headers for records are preserved in both cases.
   
   This PR fixes the issue and adds a new unit test to verify the same.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to