[
https://issues.apache.org/jira/browse/GEODE-9409?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mario Kevo updated GEODE-9409:
------------------------------
Description:
If the "create region" command is executed while the Geode server is restarting
it will fail with NullPointerException on that server.
It happens for persistent regions as it tries to findDiskStore but in that
method, it first tries to get PdxRegistry from the cache and create a
persistent Region on that. But in that case, when the cache is creating(it
takes some more time if the server is restarting), if the command is executed
fast it happened that creating cache is not finished and pdxRegistry is null,
so every method executed on that will throw NullPointerException.
{code:java}
gfsh>create region --name=/test_region2 --type=PARTITION_REDUNDANT_PERSISTENT
--total-num-buckets=113 --disk-store=dataDiskStore
--enable-synchronous-disk=false
Member | Status | Message
------- | ------ |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
server1 | OK | Region "/test_region2" created on "server1"
server2 | OK | Region "/test_region2" created on "server2"
server3 | ERROR | java.lang.NullPointerException
at
org.apache.geode.internal.cache.LocalRegion.findDiskStore(LocalRegion.java:7498)
at
org.apache.geode.internal.cache.PartitionedRegion.findDiskStore(PartitionedRe..
Cluster configuration for group 'cluster' is updated.
{code}
was:
If the "create region" command is executed while the Geode server is starting
it will fail with NullPointerException on that server.
It happens for persistent regions as it tries to findDiskStore but in that
method, it first tries to get PdxRegistry from the cache and create a
persistent Region on that. But in that case, when the cache is creating, if the
command is executed fast it happened that creating cache is not finished and
pdxRegistry is null, so every method executed on that will throw
NulPointerException.
{code:java}
gfsh>create region --name=/test_region2 --type=PARTITION_REDUNDANT_PERSISTENT
--total-num-buckets=113 --disk-store=dataDiskStore
--enable-synchronous-disk=false
Member | Status | Message
------- | ------ |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
server1 | OK | Region "/test_region2" created on "server1"
server2 | OK | Region "/test_region2" created on "server2"
server3 | ERROR | java.lang.NullPointerException
at
org.apache.geode.internal.cache.LocalRegion.findDiskStore(LocalRegion.java:7498)
at
org.apache.geode.internal.cache.PartitionedRegion.findDiskStore(PartitionedRe..
Cluster configuration for group 'cluster' is updated.
{code}
> NullPointerException while create region during server restart
> --------------------------------------------------------------
>
> Key: GEODE-9409
> URL: https://issues.apache.org/jira/browse/GEODE-9409
> Project: Geode
> Issue Type: Bug
> Components: gfsh, regions
> Reporter: Mario Kevo
> Assignee: Mario Kevo
> Priority: Major
>
> If the "create region" command is executed while the Geode server is
> restarting it will fail with NullPointerException on that server.
> It happens for persistent regions as it tries to findDiskStore but in that
> method, it first tries to get PdxRegistry from the cache and create a
> persistent Region on that. But in that case, when the cache is creating(it
> takes some more time if the server is restarting), if the command is executed
> fast it happened that creating cache is not finished and pdxRegistry is null,
> so every method executed on that will throw NullPointerException.
>
> {code:java}
> gfsh>create region --name=/test_region2 --type=PARTITION_REDUNDANT_PERSISTENT
> --total-num-buckets=113 --disk-store=dataDiskStore
> --enable-synchronous-disk=false
> Member | Status | Message
> ------- | ------ |
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> server1 | OK | Region "/test_region2" created on "server1"
> server2 | OK | Region "/test_region2" created on "server2"
> server3 | ERROR | java.lang.NullPointerException
> at
> org.apache.geode.internal.cache.LocalRegion.findDiskStore(LocalRegion.java:7498)
> at
> org.apache.geode.internal.cache.PartitionedRegion.findDiskStore(PartitionedRe..
> Cluster configuration for group 'cluster' is updated.
> {code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)