bachmanity1 commented on PR #13246: URL: https://github.com/apache/kafka/pull/13246#issuecomment-1433802673
@showuon > Basically, the size > buffer.remaining() check is originally not trying to check if the size can be allocated in the JVM, it's just a sanity check to see if this size is abnormal, right? What we're trying to protect is just the array allocation can be fit into JVM yeah, then this check definitely makes sense. It's just not immediately clear from the exception message that this check is done to prevent OOM error. -- 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