[ 
https://issues.apache.org/jira/browse/GEODE-8359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17157945#comment-17157945
 ] 

ASF GitHub Bot commented on GEODE-8359:
---------------------------------------

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]


> Server logs NPE as a warning while processing RegisterInterestList requests 
> from clients during (server) shutdown
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: GEODE-8359
>                 URL: https://issues.apache.org/jira/browse/GEODE-8359
>             Project: Geode
>          Issue Type: Bug
>          Components: client/server
>            Reporter: Mark Hanson
>            Priority: Major
>             Fix For: 1.14.0
>
>
> Getting a null pointer exception  when RegisterinterestList is called during 
> shutdown.
> {noformat}
> at 
> org.apache.geode.internal.cache.tier.sockets.command.RegisterInterestList66.cmdExecute(RegisterInterestList66.java:188)
>       at 
> org.apache.geode.internal.cache.tier.sockets.BaseCommand.execute(BaseCommand.java:183)
>       at 
> org.apache.geode.internal.cache.tier.sockets.ServerConnection.doNormalMessage(ServerConnection.java:848)
>       at 
> org.apache.geode.internal.cache.tier.sockets.OriginalServerConnection.doOneMessage(OriginalServerConnection.java:72)
>       at 
> org.apache.geode.internal.cache.tier.sockets.ServerConnection.run(ServerConnection.java:1181)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>       at 
> org.apache.geode.internal.cache.tier.sockets.AcceptorImpl.lambda$initializeServerConnectionThreadPool$3(AcceptorImpl.java:676)
>       at 
> org.apache.geode.logging.internal.executors.LoggingThreadFactory.lambda$newThread$0(LoggingThreadFactory.java:119)
>       at java.lang.Thread.run(Thread.java:748) {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to