splett2 opened a new pull request #10267: URL: https://github.com/apache/kafka/pull/10267
`Selector.poll()` will always call `pollSelectionKeys()` for channels with buffered data. `pollSelectionKeys()` will always update connection last idle time, even if the channel is muted and we don't actually read from the channel. There is an existing unit test `idleExpiryWithBufferedReceives` that fails to catch this behavior because the `MockTime` object used in the test is updated in a large enough increment to expire a connection between calls to `poll()`. After updating the test to advance time in smaller increments, the test fails without the Selector change. ### Committer Checklist (excluded from commit message) - [ ] Verify design and implementation - [ ] Verify test coverage and CI build status - [ ] Verify documentation (including upgrade notes) ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org