chia7712 commented on a change in pull request #9401:
URL: https://github.com/apache/kafka/pull/9401#discussion_r519067655
##########
File path:
clients/src/main/java/org/apache/kafka/common/requests/ProduceRequest.java
##########
@@ -194,7 +107,27 @@ private ProduceRequest build(short version, boolean
validate) {
ProduceRequest.validateRecords(version, records);
}
}
- return new ProduceRequest(version, acks, timeout,
partitionRecords, transactionalId);
+
+ List<ProduceRequestData.TopicProduceData> tpd = partitionRecords
Review comment:
The "data" may be cleared to null (for GC) so it is a risk if we lazily
initialize the partition size.
I considered to remove it as it is used by log only (toString).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]