chia7712 commented on code in PR #19346: URL: https://github.com/apache/kafka/pull/19346#discussion_r2051733779
########## raft/src/main/java/org/apache/kafka/raft/internals/RecordsIterator.java: ########## @@ -346,29 +343,12 @@ private T decodeDataRecord(Optional<ByteBuffer> key, Optional<ByteBuffer> value) } private static ControlRecord decodeControlRecord(Optional<ByteBuffer> key, Optional<ByteBuffer> value) { - if (key.isEmpty()) { - throw new IllegalArgumentException("Missing key in the record when a key was expected"); - } else if (key.get().remaining() == 0) { + if (key.get().remaining() == 0) { Review Comment: agree to @FrankYang0529 - we should keep origin checks -- 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