pnowojski commented on a change in pull request #17573: URL: https://github.com/apache/flink/pull/17573#discussion_r738335950
########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/BufferWritingResultPartition.java ########## @@ -270,20 +270,24 @@ private BufferBuilder appendUnicastDataForNewRecord( } private void addToSubpartition( - BufferBuilder buffer, int targetSubpartition, int partialRecordLength) + BufferBuilder buffer, + int targetSubpartition, + int partialRecordLength, + int minAllowedBufferSize) throws IOException { int desirableBufferSize = subpartitions[targetSubpartition].add( buffer.createBufferConsumerFromBeginning(), partialRecordLength); - resizeBuffer(buffer, desirableBufferSize); + resizeBuffer(buffer, desirableBufferSize, minAllowedBufferSize); } - private void resizeBuffer(BufferBuilder buffer, int desirableBufferSize) { + private void resizeBuffer( + BufferBuilder buffer, int desirableBufferSize, int minAllowedBufferSize) { Review comment: nit: rename `minAllowedBufferSize` -> `minDesirableBufferSize`? Or even better `remainingRecordSize`? Almost for sure that's not min allowed size, as we are allowing for smaller buffer sizes, for example if recordSize > 32KB. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org