[ https://issues.apache.org/jira/browse/GEODE-2764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15965093#comment-15965093 ]
ASF GitHub Bot commented on GEODE-2764: --------------------------------------- GitHub user nabarunnag opened a pull request: https://github.com/apache/geode/pull/449 GEODE-2764: Added checks on the region name * Substring the region name till the last occurance of '.' * Check if this substring is a valid region name * Continue this till we get valid region name * If there are no '.' left to substring on, send region not found exception. @jhuynh1 @ladyVader @gesterzhou You can merge this pull request into a Git repository by running: $ git pull https://github.com/nabarunnag/incubator-geode feature/GEODE-2764 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/geode/pull/449.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #449 ---- commit b1f4f8ba53cf25d5df8a0cdbbf8e9fcc29763bb2 Author: nabarun <n...@pivotal.io> Date: 2017-04-10T18:41:14Z GEODE-2764: Added checks on the region name * Substring the region name till the last occurance of '.' * Check if this substring is a valid region name * Continue this till we get valid region name * If there are no '.' left to substring on, send region not found exception. ---- > Index entry not entered into cluster config xml if region name contains a > function call like entrySet() > ------------------------------------------------------------------------------------------------------- > > Key: GEODE-2764 > URL: https://issues.apache.org/jira/browse/GEODE-2764 > Project: Geode > Issue Type: Bug > Reporter: nabarun > > Steps to recreate the issue type the following in a gfsh instance: > 1. start locator --name=locator > 2. start server --name=server > 3. create region --name=regionName --type=REPLICATE_PERSISTENT > 4. create index --name=regionIndex --region="regionName.entrySet() r" > --expression=r.key > -- this will result in an error message > {noformat} > Failed to create index "regionIndex" due to following reasons > null > {noformat} > Cause: > The index is created but while putting the entry into the clusterconfig it > tries to put the region name as regionName.entrySet() which does not exist. > cache.getRegion(regionName.entrySet()) will result in null and no xml entry > is added to the clusterconfig. So when the server is restarted, there is no > index entry in the cluster config xml hence the index is not re-created. > Solution: > If the region name contains the character '(' and ')' spilt the region name > at the index of '.' and check if the region exists. > If the check returns successful only then enter the entry into the cluster > config. -- This message was sent by Atlassian JIRA (v6.3.15#6346)