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

ASF subversion and git services commented on GEODE-7466:
--------------------------------------------------------

Commit ded358a9242e2436aa73918d9e554a6ea6d65c10 in geode's branch 
refs/heads/feature/GEODE-7466 from Barry Oglesby
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=ded358a ]

GEODE-7466: Closed the existing CacheClientNotifier instance if it exists


> HARegionQueueTest 
> queuePutElidesSequenceIdLowerThanOrEqualToLastSeenSequenceId can throw a 
> NullPointerException if the CacheClientNotifier instance is set
> ----------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: GEODE-7466
>                 URL: https://issues.apache.org/jira/browse/GEODE-7466
>             Project: Geode
>          Issue Type: Bug
>          Components: tests
>            Reporter: Barrett Oglesby
>            Priority: Major
>
> Testing has shown this NPE can occur:
> {noformat}
> java.lang.NullPointerException
>     at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
>     at 
> org.apache.geode.internal.cache.tier.sockets.CacheClientNotifier.getClientProxy(CacheClientNotifier.java:1197)
>     at 
> org.apache.geode.internal.cache.ha.HARegionQueue$DispatchedAndCurrentEvents.putObject(HARegionQueue.java:3023)
>     at 
> org.apache.geode.internal.cache.ha.HARegionQueue.basicPut(HARegionQueue.java:679)
>     at 
> org.apache.geode.internal.cache.ha.HARegionQueue.put(HARegionQueue.java:631)
>     at 
> org.apache.geode.internal.cache.ha.HARegionQueueTest.queuePutElidesSequenceIdLowerThanOrEqualToLastSeenSequenceId(HARegionQueueTest.java:119)
> {noformat}
> HARegionQueue.java:3023 is here:
> {noformat}
>                             CacheClientNotifier ccn = 
> CacheClientNotifier.getInstance();
>                             if (ccn != null) {
> HARegionQueue.java:3023 ->    
> ccn.getClientProxy(owningQueue.clientProxyID).getStatistics().incMessagesFailedQueued();
>                             }
> {noformat}
> The HARegionQueueTest does not create a CacheClientNotifier, so it seems like 
> its created in another test and that test affects this one.
> If a CacheClientNotifier is created in this test, then the same NPE is thrown 
> because owningQueue.clientProxyID is null.



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

Reply via email to