muralibasani commented on code in PR #21676:
URL: https://github.com/apache/kafka/pull/21676#discussion_r3581462527


##########
clients/src/main/java/org/apache/kafka/common/record/internal/MemoryRecordsBuilder.java:
##########
@@ -867,6 +915,24 @@ public boolean hasRoomFor(long timestamp, ByteBuffer key, 
ByteBuffer value, Head
         return this.writeLimit >= estimatedBytesWritten() + recordSize;
     }
 
+    public boolean hasRoomFor(long timestamp, byte[] key, byte[] value, byte[] 
rawSerializedHeaders) {
+        return hasRoomFor(timestamp, wrapNullable(key), wrapNullable(value), 
rawSerializedHeaders);
+    }
+
+    public boolean hasRoomFor(long timestamp, ByteBuffer key, ByteBuffer 
value, byte[] rawSerializedHeaders) {

Review Comment:
   Good one. Fixed. hasRoomFor(.. method now guards magic < V2 up front and 
throws 



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