public void clearPartitionRecords() {
        // lazily initialize partitionSizes.
        partitionSizes();
        data = null;
    }
@return data or IllegalStateException if the data is removed (to prevent unnecessary memory retention).
clients/src/main/java/org/apache/kafka/common/requests/ProduceRequest.java