rajinisivaram commented on code in PR #20258:
URL: https://github.com/apache/kafka/pull/20258#discussion_r2245231741
##########
clients/src/main/java/org/apache/kafka/common/security/authenticator/SaslServerAuthenticator.java:
##########
@@ -382,6 +382,12 @@ private void setSaslState(SaslState saslState,
AuthenticationException exception
} else {
this.saslState = saslState;
LOG.debug("Set SASL server state to {} during {}", saslState,
reauthInfo.authenticationOrReauthenticationText());
+ if (saslState == SaslState.COMPLETE) {
+ // make sure that any pending write is actually sent.
+ if (reauthInfo.reauthenticating()) {
+ transportLayer.addInterestOps(SelectionKey.OP_WRITE);
Review Comment:
If there is nothing to send, we will need to reset this somewhere (or set it
here only if it was set before reauth). Otherwise poll may return early until
this write interest is reset, even though there is nothing to read or write for
this channel. Can we check that this doesn't cause unnecessary return from poll
when there is nothing to send from the broker?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]