FrankYang0529 commented on PR #18216: URL: https://github.com/apache/kafka/pull/18216#issuecomment-2548229510
> This added twice as much code as it removed The reason is that old code can use single line to represent a response, but new structure needs to use multiple lines. Old one: ``` ProduceResponse.PartitionResponse resp = new ProduceResponse.PartitionResponse(error, offset, RecordBatch.NO_TIMESTAMP, logStartOffset); ``` New one: ``` new ProduceResponseData.PartitionProduceResponse() .setIndex(tp.partition()) .setErrorCode(error.code()) .setBaseOffset(offset) .setLogStartOffset(logStartOffset) .setLogAppendTimeMs(RecordBatch.NO_TIMESTAMP) ``` -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org