You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/06/16 21:49:00 UTC

[jira] [Commented] (GEODE-8261) Do not add proxyID to client interest list if it is null

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

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

nabarunnag merged pull request #5251:
URL: https://github.com/apache/geode/pull/5251


   


----------------------------------------------------------------
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:
users@infra.apache.org


> Do not add proxyID to client interest list if it is null
> --------------------------------------------------------
>
>                 Key: GEODE-8261
>                 URL: https://issues.apache.org/jira/browse/GEODE-8261
>             Project: Geode
>          Issue Type: Task
>          Components: client queues
>            Reporter: Nabarun Nag
>            Priority: Major
>
> * Sometime during shutdown proxyIDs can be nullĀ 
>  * Attempting to add this null value to data structures can cause NPE. For example the below mentioned code snippets may cause NPE if proxyID is null.
> {code:java}
> protected void addClientCQsAndInterestList(ClientUpdateMessageImpl msg,
>       HAEventWrapper haEventWrapper, Map haContainer, String regionName) {    ClientProxyMembershipID proxyID = ((HAContainerWrapper) haContainer).getProxyID(regionName);
>     if (proxyID != null) {
>       if (haEventWrapper.getClientCqs() != null) {
>         CqNameToOp clientCQ = haEventWrapper.getClientCqs().get(proxyID);
>         if (clientCQ != null) {
>           msg.addClientCqs(proxyID, clientCQ);
>         }
>       }      // This is a remote HAEventWrapper.
>       // Add new Interested client lists.
>       ClientUpdateMessageImpl clientMsg =
>           (ClientUpdateMessageImpl) haEventWrapper.getClientUpdateMessage();
>       if (clientMsg != null) {
>         if (clientMsg.isClientInterestedInUpdates(proxyID)) {
>           msg.addClientInterestList(proxyID, true);
>         } else if (clientMsg.isClientInterestedInInvalidates(proxyID)) {
>           msg.addClientInterestList(proxyID, false);
>         }
>       }
>     }
>   }
> {code}



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