mhansonp commented on a change in pull request #5371:
URL: https://github.com/apache/geode/pull/5371#discussion_r454830735
##########
File path:
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/RegisterInterestList66.java
##########
@@ -163,29 +162,40 @@ public void cmdExecute(final Message clientMessage, final
ServerConnection serve
}
try {
securityService.authorize(Resource.DATA, Operation.READ, regionName);
- AuthorizeRequest authzRequest = serverConnection.getAuthzRequest();
- if (authzRequest != null) {
+ AuthorizeRequest authorizeRequest = serverConnection.getAuthzRequest();
+ if (authorizeRequest != null) {
if (!DynamicRegionFactory.regionIsDynamicRegionList(regionName)) {
RegisterInterestOperationContext registerContext =
- authzRequest.registerInterestListAuthorize(regionName, keys,
policy);
- keys = (List) registerContext.getKey();
+ authorizeRequest.registerInterestListAuthorize(regionName, keys,
policy);
+ keys = (List<Object>) registerContext.getKey();
}
}
// Register interest
serverConnection.getAcceptor().getCacheClientNotifier().registerClientInterest(regionName,
keys, serverConnection.getProxyID(), isDurable,
sendUpdatesAsInvalidates, true,
regionDataPolicyPartBytes[0], true);
- } catch (Exception ex) {
+ } catch (Exception e) {
// If an interrupted exception is thrown , rethrow it
- checkForInterrupt(serverConnection, ex);
+ checkForInterrupt(serverConnection, e);
// Otherwise, write an exception message and continue
- writeChunkedException(clientMessage, ex, serverConnection);
+ writeChunkedException(clientMessage, e, serverConnection);
serverConnection.setAsTrue(RESPONDED);
return;
}
- boolean isPrimary = serverConnection.getAcceptor().getCacheClientNotifier()
- .getClientProxy(serverConnection.getProxyID()).isPrimary();
+ CacheClientProxy ccp =
serverConnection.getAcceptor().getCacheClientNotifier()
+ .getClientProxy(serverConnection.getProxyID());
+
+ if (ccp == null) {
Review comment:
The core issue was an NPE, because there was no cache client proxy
returned during shutdown.
----------------------------------------------------------------
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:
[email protected]