badaiaqrandista commented on code in PR #12416: URL: https://github.com/apache/kafka/pull/12416#discussion_r923947288
########## clients/src/main/java/org/apache/kafka/common/network/Selector.java: ########## @@ -652,6 +652,11 @@ void write(KafkaChannel channel) throws IOException { if (send != null) { this.completedSends.add(send); this.sensors.recordCompletedSend(nodeId, send.size(), currentTimeMs); + + // To fix KAFKA-13559, i.e. select(timeout) blocks for 300 ms when the socket has no data but the buffer + // has data. Only happens when using SSL. + if (channel.hasBytesBuffered()) + madeReadProgressLastPoll = true; Review Comment: @ijuma Should I move this to `pollSelectionKeys` after calling `attemptWrite` (see below link)? https://github.com/apache/kafka/blob/f2242f44fdee9b5575c8f359bacb0e5f457ffd42/clients/src/main/java/org/apache/kafka/common/network/Selector.java#L593 I have tested that this would also work. -- 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