omkreddy commented on code in PR #20258:
URL: https://github.com/apache/kafka/pull/20258#discussion_r2245423044


##########
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:
   @rajinisivaram Thanks for the review. The issue here is that there can be a 
send while reauthentication is in progress. I’ve updated the code to track 
write interest during reauth and set it only when required — let me know your 
thoughts.



-- 
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

Reply via email to