satishd commented on code in PR #14285:
URL: https://github.com/apache/kafka/pull/14285#discussion_r1305456790


##########
storage/src/test/java/org/apache/kafka/tiered/storage/utils/RecordsKeyValueMatcher.java:
##########
@@ -138,18 +140,21 @@ private boolean compare(ByteBuffer lhs,
     private SimpleRecord convert(Object recordCandidate) {
         if (recordCandidate instanceof ProducerRecord) {
             ProducerRecord<?, ?> record = (ProducerRecord<?, ?>) 
recordCandidate;
+            long timestamp = record.timestamp() == null ? 
RecordBatch.NO_TIMESTAMP : record.timestamp();
             ByteBuffer keyBytes =
                     
Utils.wrapNullable(keySerde.serializer().serialize(topicPartition.topic(), (K) 
record.key()));
             ByteBuffer valueBytes =
                     
Utils.wrapNullable(valueSerde.serializer().serialize(topicPartition.topic(), 
(V) record.value()));
-            return new SimpleRecord(record.timestamp(), keyBytes, valueBytes, 
record.headers().toArray());
+            Header[] headers = record.headers() != null ? 
record.headers().toArray() : Record.EMPTY_HEADERS;

Review Comment:
   okay, makes sense. 



-- 
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

Reply via email to