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 subversion and git services (JIRA)" <ji...@apache.org> on 2019/04/12 20:22:00 UTC

[jira] [Commented] (GEODE-6630) RedundancyLogger might throw NPE

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

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

Commit 9f85d83e031ad8a46267c014baea53bd8970bea0 in geode's branch refs/heads/feature/GEODE-6195b from Bruce Schuchardt
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=9f85d83 ]

GEODE-6195 putIfAbsent may get a returned value caused by the same operation due to retry

Moving the check for a retried putIfAbsent to be under the RegionEntry
lock.  This allows the operation to propagate throughout the cluster and
allows the client to receive a valid version tag, if concurrency checks
are enabled.

This also fixes GEODE-6630, "RedundancyLogger might throw NPE" because
tests were frequently running into that issue.


> RedundancyLogger might throw NPE
> --------------------------------
>
>                 Key: GEODE-6630
>                 URL: https://issues.apache.org/jira/browse/GEODE-6630
>             Project: Geode
>          Issue Type: Bug
>            Reporter: xiaojian zhou
>            Assignee: Bruce Schuchardt
>            Priority: Major
>
> {noformat}
> I noticed in some tests with following error logged in debug level:
> [debug 2019/04/10 11:25:52.904 PDT <RedundancyLogger for region TestRegion> tid=0x55] Unexpected exception in PR redundancy recovery
> java.lang.NullPointerException
>         at org.apache.geode.internal.cache.partitioned.RedundancyLogger.run2(RedundancyLogger.java:154)
>         at org.apache.geode.internal.cache.partitioned.RecoveryRunnable.run(RecoveryRunnable.java:59)
>         at java.lang.Thread.run(Thread.java:748)
> Then I looked at the code that it's using:
> (this.allBucketsRecoveredFromDisk.getCount() > 0) in more than one places.
> The allBucketsRecoveredFromDisk is referecing to the object in PRHARedundancyProvider. 
> But in PRHARedundancyProvider, it is using:
>   public boolean isPersistentRecoveryComplete() {
>     if (!ColocationHelper.checkMembersColocation(this.prRegion, this.prRegion.getMyId())) {
>       return false;
>     }
>     if (allBucketsRecoveredFromDisk != null && allBucketsRecoveredFromDisk.getCount() > 0) {
>       return false;
>     }
> So allBucketsRecoveredFromDisk could be null. We should alway use 
> "(allBucketsRecoveredFromDisk != null && allBucketsRecoveredFromDisk.getCount() > 0) " instead of "(this.allBucketsRecoveredFromDisk.getCount() > 0)"
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)