pivotal-jbarrett commented on code in PR #7603:
URL: https://github.com/apache/geode/pull/7603#discussion_r855418434


##########
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/MessageDispatcher.java:
##########
@@ -83,7 +84,7 @@ public class MessageDispatcher extends LoggingThread {
   /**
    * Default value in milliseconds for waiting for re-authentication
    */
-  private static final long DEFAULT_RE_AUTHENTICATE_WAIT_TIME = 60 * 1000;
+  private static final long DEFAULT_RE_AUTHENTICATE_WAIT_TIME = 
Duration.of(60, SECONDS).toMillis();

Review Comment:
   Going to split some hairs here, but why make a humans do math in their heads?
   ```java
   Duration.of(1, MINUTES).toMillis()
   ```



##########
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/MessageDispatcher.java:
##########
@@ -578,6 +570,23 @@ private boolean 
handleAuthenticationExpiredException(AuthenticationExpiredExcept
     return false;
   }
 
+  private boolean unRegisterUnsupportedClient(AuthenticationExpiredException 
expired) {
+    if 
(getProxy().getVersion().isNewerThanOrEqualTo(RE_AUTHENTICATION_START_VERSION)) 
{
+      return false;
+    }
+
+    // for old client, don't wait for re-auth but unregister this proxy 
completely.

Review Comment:
   This makes for the start of a javadoc for this method.



##########
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/MessageDispatcher.java:
##########
@@ -531,21 +532,12 @@ protected void runDispatcher() {
 
   private boolean 
handleAuthenticationExpiredException(AuthenticationExpiredException expired)
       throws InterruptedException {
-    long reAuthenticateWaitTime =
-        getSystemProperty(RE_AUTHENTICATE_WAIT_TIME, 
DEFAULT_RE_AUTHENTICATE_WAIT_TIME);
-    // for old client, don't wait for re-auth but unregister this proxy 
completely.
-    if (getProxy().getVersion().isOlderThan(RE_AUTHENTICATION_START_VERSION)) {
-      synchronized (_stopDispatchingLock) {
-        String message =
-            "Authentication expired for a client with a version less than 
Geode 1.15. Cannot re-authenticate an older client "
-                + " that has a server to client queue for CQs or interest 
registrations. "
-                + "Please upgrade your client to Geode 1.15 or greater to 
allow re-authentication.";
-        logger.warn(message);
-        pauseOrUnregisterProxy(expired);
-      }
+    if (unRegisterUnsupportedClient(expired)) {

Review Comment:
   Unregister is one word, so the method name following naming standards should 
not camelCase the `unRegister`.



-- 
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: notifications-unsubscr...@geode.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to