[
https://issues.apache.org/jira/browse/GEODE-3937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16261309#comment-16261309
]
ASF GitHub Bot commented on GEODE-3937:
---------------------------------------
jhuynh1 commented on issue #1002: GEODE-3937:Fix NPE when executing
removeFromDisk
URL: https://github.com/apache/geode/pull/1002#issuecomment-345806099
Hi
There are a few things going on in this PR…
First it looks like you are attempting to add a lot of test code to clear a
bucket region queue, this in turn ends up with an NPE thrown in DiskEntry.
However, Geode does not currently support clearing the bucket region queue
and so this PR introduces some “test” product code. The regression test then
calls this “test” code to do the clear. The NPE is then thrown. The NPE
itself looks like it would be a product issue, however it turns out that the
remove you have attempted to call on the bucketRegion is not the correct remove
when it comes to a bucketRegionQueue. What should have been called is
destroyKey from the bucket region queue. Whenever clear is added to the
product, it would have to handle this special case.
The fix to ignore the null in DiskEntry should not be added at this time.
I don’t think we should be adding this product code or the related “test”
code. It is hiliting a problem that does not currently exist in Geode. The
NPE is due to invalid test code.
here is are the entry that is removed when removing from a BucketRegionQueue:
[vm4]
mapDestroy:EntryEventImpl[op=DESTROY;region=/__PR/_B__ln__PARALLEL__GATEWAY__SENDER__QUEUE_0;key=100;oldValue=null;newValue=null;callbackArg=null;originRemote=false;originMember=10.118.20.91(30103)<v1>:32773;id=EventIDid=18bytes;threadID=2;sequenceID=0]]
Compared to the entry the test code attempts to remove:
[vm4]
mapDestroy:EntryEventImpl[op=DESTROY;region=/ln_PARALLEL_GATEWAY_SENDER_QUEUE;key=100;oldValue=null;newValue=null;callbackArg=null;originRemote=false;originMember=10.118.20.91(30117)<v1>:32773;id=EventIDid=18bytes;threadID=1;sequenceID=51]]
The BucketRegionQueue explicitly sets itself as the region to remove from,
whereas the remove that was called in the test code does not do this.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Fix NPE when executing removeFromDisk
> --------------------------------------
>
> Key: GEODE-3937
> URL: https://issues.apache.org/jira/browse/GEODE-3937
> Project: Geode
> Issue Type: Bug
> Components: wan
> Reporter: dinesh akhand
> Priority: Trivial
>
> While executing the test case or clearQueueTestOnly method. we can see
> exception
> [vm4] java.lang.NullPointerException
> [vm4] at
> org.apache.geode.internal.cache.entries.DiskEntry$Helper.removeFromDisk(DiskEntry.java:1519)
> [vm4] at
> org.apache.geode.internal.cache.entries.AbstractOplogDiskRegionEntry.removePhase1(AbstractOplogDiskRegionEntry.java:50)
> [vm4] at
> org.apache.geode.internal.cache.entries.AbstractRegionEntry.destroy(AbstractRegionEntry.java:914)
> [vm4] at
> org.apache.geode.internal.cache.AbstractRegionMap.destroyEntry(AbstractRegionMap.java:3100)
> [vm4] at
> org.apache.geode.internal.cache.AbstractRegionMap.destroy(AbstractRegionMap.java:1429)
> [vm4] at
> org.apache.geode.internal.cache.LocalRegion.mapDestroy(LocalRegion.java:6465)
> [vm4] at
> org.apache.geode.internal.cache.LocalRegion.mapDestroy(LocalRegion.java:6439)
> [vm4] at
> org.apache.geode.internal.cache.BucketRegion.basicDestroy(BucketRegion.java:1167)
> [vm4] at
> org.apache.geode.internal.cache.AbstractBucketRegionQueue.basicDestroy(AbstractBucketRegionQueue.java:352)
> [vm4] at
> org.apache.geode.internal.cache.BucketRegionQueue.basicDestroy(BucketRegionQueue.java:366)
> [vm4] at
> org.apache.geode.internal.cache.LocalRegion.validatedDestroy(LocalRegion.java:1101)
> [vm4] at
> org.apache.geode.internal.cache.DistributedRegion.validatedDestroy(DistributedRegion.java:942)
> [vm4] at
> org.apache.geode.internal.cache.LocalRegion.destroy(LocalRegion.java:1086)
> [vm4] at
> org.apache.geode.internal.cache.AbstractRegion.destroy(AbstractRegion.java:315)
> [vm4] at
> org.apache.geode.internal.cache.LocalRegion.remove(LocalRegion.java:8870)
> [vm4] at
> org.apache.geode.internal.cache.wan.parallel.ParallelGatewaySenderQueue.clearPartitionedRegion(ParallelGatewaySenderQueue.java:1820)
> [vm4] at
> org.apache.geode.internal.cache.wan.parallel.ParallelGatewaySenderQueue.clearQueue(ParallelGatewaySenderQueue.java:1795)
> [vm4] at
> org.apache.geode.internal.cache.wan.parallel.ConcurrentParallelGatewaySenderQueue.clearQueue(ConcurrentParallelGatewaySenderQueue.java:236)
> [vm4] at
> org.apache.geode.internal.cache.wan.WANTestBase.clearGatewaySender(WANTestBase.java:256)
> [vm4] at
> org.apache.geode.internal.cache.wan.parallel.ParallelGatewaySenderQueueOverflowDUnitTest.lambda$8(ParallelGatewaySenderQueueOverflowDUnitTest.java:96)
> [vm4] at
> org.apache.geode.internal.cache.wan.parallel.ParallelGatewaySenderQueueOverflowDUnitTest$$Lambda$42/144498586.run(Unknown
> Source)
> [vm4] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)