RegionDestroyedException while querying a partitioned region using any form of a where NOT clause in VMware Tanzu GemFire
search cancel

RegionDestroyedException while querying a partitioned region using any form of a where NOT clause in VMware Tanzu GemFire

book

Article ID: 294348

calendar_today

Updated On:

Products

VMware Tanzu Gemfire

Issue/Introduction

While querying partitioned regions with NOT or any form of NOT, such as, "!=" clause, GemFire servers throw an exception similar to:
Caused by: org.apache.geode.cache.client.ServerOperationException: remote server on server111(21923:loner):54956:8d1a37aa: While performing a remote query at org.apache.geode.cache.client.internal.AbstractOp.processChunkedResponse(AbstractOp.java:345)
...

    ... 233 more
Caused by: org.apache.geode.cache.query.QueryInvocationTargetException: The Region on which query is executed may have been destroyed.BucketRegion[path='/__PR/_B__REGION_0;serial=1942;primary=false]
    at org.apache.geode.internal.cache.PRQueryProcessor.executeQueryOnBuckets(PRQueryProcessor.java:262)
...
    at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.geode.cache.RegionDestroyedException: BucketRegion[path='/__PR/_B__REGION_0;serial=1942;primary=false]
    at org.apache.geode.internal.cache.LocalRegion.checkRegionDestroyed(LocalRegion.java:7413)



Environment

Product Version: 9.8

Resolution

This is a known issue fixed in the following, and later, versions:
  • VMware Tanzu GemFire 9.10.7
  • Apache Geode 1.13.3
  • Apache Geode 1.14.0
  • Apache Geode 1.15.0
To work around this issue, you can do either of the following:
  • Avoid the use of NOT or any form of NOT, such as, "!=", in the query.
  • Use an IN clause by providing values of the object/field that you are querying instead.


Example

Object Y has these values:
  • aaa
  • bbb
  • ccc
  • ddd

Instead of this following query:
SELECT DISTINCT FROM X <region> WHERE X.ObjectY.toString() != 'aaa' 
You use the following query:
SELECT DISTINCT FROM X <region> WHERE X.ObjectY.toString() in set ('bbb', 'ccc', 'ddd')