pivotal-jbarrett commented on code in PR #7603:
URL: https://github.com/apache/geode/pull/7603#discussion_r855443114
##########
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/MessageDispatcher.java:
##########
@@ -565,12 +563,31 @@ private boolean
handleAuthenticationExpiredException(AuthenticationExpiredExcept
"Client did not re-authenticate back successfully in {} ms.
Unregister this client proxy.",
elapsedTime);
pauseOrUnregisterProxy(expired);
- return true;
}
+ return true;
}
return false;
}
+ /**
+ * for old client, don't wait for re-auth but unregister this proxy
completely.
+ */
+ private boolean unregisterUnsupportedClient(AuthenticationExpiredException
expired) {
+ if
(getProxy().getVersion().isNewerThanOrEqualTo(RE_AUTHENTICATION_START_VERSION))
{
+ return false;
+ }
+
+ 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);
Review Comment:
This should be inlined.
##########
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/MessageDispatcher.java:
##########
@@ -565,12 +563,31 @@ private boolean
handleAuthenticationExpiredException(AuthenticationExpiredExcept
"Client did not re-authenticate back successfully in {} ms.
Unregister this client proxy.",
elapsedTime);
pauseOrUnregisterProxy(expired);
- return true;
}
+ return true;
}
return false;
}
+ /**
+ * for old client, don't wait for re-auth but unregister this proxy
completely.
+ */
+ private boolean unregisterUnsupportedClient(AuthenticationExpiredException
expired) {
+ if
(getProxy().getVersion().isNewerThanOrEqualTo(RE_AUTHENTICATION_START_VERSION))
{
+ return false;
+ }
+
+ synchronized (_stopDispatchingLock) {
Review Comment:
Should the lock really be held whilst logging the warning?
--
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]