[jira] [Commented] (GEODE-2950) Lucene index names should be restricted to valid region names since the index name becomes part of a region
[ https://issues.apache.org/jira/browse/GEODE-2950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16025541#comment-16025541 ] ASF GitHub Bot commented on GEODE-2950: --- Github user asfgit closed the pull request at: https://github.com/apache/geode/pull/540 > Lucene index names should be restricted to valid region names since the index > name becomes part of a region > --- > > Key: GEODE-2950 > URL: https://issues.apache.org/jira/browse/GEODE-2950 > Project: Geode > Issue Type: Bug > Components: lucene >Reporter: Barry Oglesby >Assignee: David Anuta > Fix For: 1.2.0 > > > Currently, invalid region name characters can be used as index names. The > index name becomes part of the async event queue id which becomes part of the > colocated region name, so invalid characters shouldn't be allowed as index > names. LocalRegion has a validateRegionName method that restricts the names > to {{\[aA-zZ0-9-_.\]+}}. This method should be called to validate index names. > Here is an example (option-j creates the ∆): > {noformat} > gfsh>create lucene index --name=∆∆∆ --region=data --field=text > Member| Status > --- | - > 192.168.2.4(server2:53308):1025 | Successfully created lucene index > 192.168.2.4(server1:53315):1026 | Successfully created lucene index > {noformat} > {noformat} > gfsh>create region --name=data --type=PARTITION > Member | Status > --- | --- > server2 | Region "/data" created on "server2" > server1 | Region "/data" created on "server1" > {noformat} > {noformat} > gfsh>put --key=0 --value=0 --region=data > Result : true > Key Class : java.lang.String > Key : 0 > Value Class : java.lang.String > Old Value : > {noformat} > {noformat} > gfsh>describe lucene index --name=∆∆∆ --region=/data > Index Name | Region Path | Server Name | Indexed Fields | Field Analyzer > | Status| Query Executions | Updates | Commits | Documents > -- | --- | --- | -- | > --- | --- | | --- | --- > | - > ∆∆∆| /data | server1 | [text] | > {text=StandardAnalyzer} | Initialized | 0| 0 | 0 > | 0 > ∆∆∆| /data | server2 | [text] | > {text=StandardAnalyzer} | Initialized | 0| 1 | 1 > | 1 > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (GEODE-2950) Lucene index names should be restricted to valid region names since the index name becomes part of a region
[ https://issues.apache.org/jira/browse/GEODE-2950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16025540#comment-16025540 ] ASF subversion and git services commented on GEODE-2950: Commit 5ab4a69378c697fdf050048165e2945a4b028eb7 in geode's branch refs/heads/develop from [~DivineEnder] [ https://git-wip-us.apache.org/repos/asf?p=geode.git;h=5ab4a69 ] GEODE-2950: Updated error messages * Different error messages are displayed when validating region names versus indexes. * Added flexible enum allowing for expanded error messages and name validation. This closes #540 > Lucene index names should be restricted to valid region names since the index > name becomes part of a region > --- > > Key: GEODE-2950 > URL: https://issues.apache.org/jira/browse/GEODE-2950 > Project: Geode > Issue Type: Bug > Components: lucene >Reporter: Barry Oglesby >Assignee: David Anuta > Fix For: 1.2.0 > > > Currently, invalid region name characters can be used as index names. The > index name becomes part of the async event queue id which becomes part of the > colocated region name, so invalid characters shouldn't be allowed as index > names. LocalRegion has a validateRegionName method that restricts the names > to {{\[aA-zZ0-9-_.\]+}}. This method should be called to validate index names. > Here is an example (option-j creates the ∆): > {noformat} > gfsh>create lucene index --name=∆∆∆ --region=data --field=text > Member| Status > --- | - > 192.168.2.4(server2:53308):1025 | Successfully created lucene index > 192.168.2.4(server1:53315):1026 | Successfully created lucene index > {noformat} > {noformat} > gfsh>create region --name=data --type=PARTITION > Member | Status > --- | --- > server2 | Region "/data" created on "server2" > server1 | Region "/data" created on "server1" > {noformat} > {noformat} > gfsh>put --key=0 --value=0 --region=data > Result : true > Key Class : java.lang.String > Key : 0 > Value Class : java.lang.String > Old Value : > {noformat} > {noformat} > gfsh>describe lucene index --name=∆∆∆ --region=/data > Index Name | Region Path | Server Name | Indexed Fields | Field Analyzer > | Status| Query Executions | Updates | Commits | Documents > -- | --- | --- | -- | > --- | --- | | --- | --- > | - > ∆∆∆| /data | server1 | [text] | > {text=StandardAnalyzer} | Initialized | 0| 0 | 0 > | 0 > ∆∆∆| /data | server2 | [text] | > {text=StandardAnalyzer} | Initialized | 0| 1 | 1 > | 1 > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (GEODE-2950) Lucene index names should be restricted to valid region names since the index name becomes part of a region
[ https://issues.apache.org/jira/browse/GEODE-2950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16025481#comment-16025481 ] ASF GitHub Bot commented on GEODE-2950: --- GitHub user DivineEnder opened a pull request: https://github.com/apache/geode/pull/540 GEODE-2950: Updated error messages * Different error messages are displayed when validating region names versus indexes. * Added flexible enum allowing for expanded error messages and name validation. Thank you for submitting a contribution to Apache Geode. In order to streamline the review of the contribution we ask you to ensure the following steps have been taken: ### For all changes: - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message? - [ ] Has your PR been rebased against the latest commit within the target branch (typically `develop`)? - [ ] Is your initial contribution a single, squashed commit? - [ ] Does `gradlew build` run cleanly? - [ ] Have you written or updated unit tests to verify your changes? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? ### Note: Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible. If you need help, please send an email to dev@geode.apache.org. You can merge this pull request into a Git repository by running: $ git pull https://github.com/DivineEnder/geode feature/GEODE-2950 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/geode/pull/540.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 #540 commit 382f3e672964c76c3854f33c3b628c5a0234eb66 Author: David AnutaDate: 2017-05-25T22:18:40Z GEODE-2950: Updated error messages * Different error messages are displayed when validating region names versus indexes. * Added flexible enum allowing for expanded error messages and name validation. > Lucene index names should be restricted to valid region names since the index > name becomes part of a region > --- > > Key: GEODE-2950 > URL: https://issues.apache.org/jira/browse/GEODE-2950 > Project: Geode > Issue Type: Bug > Components: lucene >Reporter: Barry Oglesby >Assignee: David Anuta > Fix For: 1.2.0 > > > Currently, invalid region name characters can be used as index names. The > index name becomes part of the async event queue id which becomes part of the > colocated region name, so invalid characters shouldn't be allowed as index > names. LocalRegion has a validateRegionName method that restricts the names > to {{\[aA-zZ0-9-_.\]+}}. This method should be called to validate index names. > Here is an example (option-j creates the ∆): > {noformat} > gfsh>create lucene index --name=∆∆∆ --region=data --field=text > Member| Status > --- | - > 192.168.2.4(server2:53308):1025 | Successfully created lucene index > 192.168.2.4(server1:53315):1026 | Successfully created lucene index > {noformat} > {noformat} > gfsh>create region --name=data --type=PARTITION > Member | Status > --- | --- > server2 | Region "/data" created on "server2" > server1 | Region "/data" created on "server1" > {noformat} > {noformat} > gfsh>put --key=0 --value=0 --region=data > Result : true > Key Class : java.lang.String > Key : 0 > Value Class : java.lang.String > Old Value : > {noformat} > {noformat} > gfsh>describe lucene index --name=∆∆∆ --region=/data > Index Name | Region Path | Server Name | Indexed Fields | Field Analyzer > | Status| Query Executions | Updates | Commits | Documents > -- | --- | --- | -- | > --- | --- | | --- | --- > | - > ∆∆∆| /data | server1 | [text] | > {text=StandardAnalyzer} | Initialized | 0| 0 | 0 > | 0 > ∆∆∆| /data | server2 | [text] | > {text=StandardAnalyzer} | Initialized | 0| 1 | 1 > | 1 > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (GEODE-2950) Lucene index names should be restricted to valid region names since the index name becomes part of a region
[ https://issues.apache.org/jira/browse/GEODE-2950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16025482#comment-16025482 ] ASF GitHub Bot commented on GEODE-2950: --- Github user DivineEnder commented on the issue: https://github.com/apache/geode/pull/540 @ladyVader @nabarunnag @boglesby @jhuynh1 @upthewaterspout @gesterzhou > Lucene index names should be restricted to valid region names since the index > name becomes part of a region > --- > > Key: GEODE-2950 > URL: https://issues.apache.org/jira/browse/GEODE-2950 > Project: Geode > Issue Type: Bug > Components: lucene >Reporter: Barry Oglesby >Assignee: David Anuta > Fix For: 1.2.0 > > > Currently, invalid region name characters can be used as index names. The > index name becomes part of the async event queue id which becomes part of the > colocated region name, so invalid characters shouldn't be allowed as index > names. LocalRegion has a validateRegionName method that restricts the names > to {{\[aA-zZ0-9-_.\]+}}. This method should be called to validate index names. > Here is an example (option-j creates the ∆): > {noformat} > gfsh>create lucene index --name=∆∆∆ --region=data --field=text > Member| Status > --- | - > 192.168.2.4(server2:53308):1025 | Successfully created lucene index > 192.168.2.4(server1:53315):1026 | Successfully created lucene index > {noformat} > {noformat} > gfsh>create region --name=data --type=PARTITION > Member | Status > --- | --- > server2 | Region "/data" created on "server2" > server1 | Region "/data" created on "server1" > {noformat} > {noformat} > gfsh>put --key=0 --value=0 --region=data > Result : true > Key Class : java.lang.String > Key : 0 > Value Class : java.lang.String > Old Value : > {noformat} > {noformat} > gfsh>describe lucene index --name=∆∆∆ --region=/data > Index Name | Region Path | Server Name | Indexed Fields | Field Analyzer > | Status| Query Executions | Updates | Commits | Documents > -- | --- | --- | -- | > --- | --- | | --- | --- > | - > ∆∆∆| /data | server1 | [text] | > {text=StandardAnalyzer} | Initialized | 0| 0 | 0 > | 0 > ∆∆∆| /data | server2 | [text] | > {text=StandardAnalyzer} | Initialized | 0| 1 | 1 > | 1 > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (GEODE-2950) Lucene index names should be restricted to valid region names since the index name becomes part of a region
[ https://issues.apache.org/jira/browse/GEODE-2950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16025159#comment-16025159 ] ASF GitHub Bot commented on GEODE-2950: --- Github user asfgit closed the pull request at: https://github.com/apache/geode/pull/532 > Lucene index names should be restricted to valid region names since the index > name becomes part of a region > --- > > Key: GEODE-2950 > URL: https://issues.apache.org/jira/browse/GEODE-2950 > Project: Geode > Issue Type: Bug > Components: lucene >Reporter: Barry Oglesby >Assignee: David Anuta > > Currently, invalid region name characters can be used as index names. The > index name becomes part of the async event queue id which becomes part of the > colocated region name, so invalid characters shouldn't be allowed as index > names. LocalRegion has a validateRegionName method that restricts the names > to {{\[aA-zZ0-9-_.\]+}}. This method should be called to validate index names. > Here is an example (option-j creates the ∆): > {noformat} > gfsh>create lucene index --name=∆∆∆ --region=data --field=text > Member| Status > --- | - > 192.168.2.4(server2:53308):1025 | Successfully created lucene index > 192.168.2.4(server1:53315):1026 | Successfully created lucene index > {noformat} > {noformat} > gfsh>create region --name=data --type=PARTITION > Member | Status > --- | --- > server2 | Region "/data" created on "server2" > server1 | Region "/data" created on "server1" > {noformat} > {noformat} > gfsh>put --key=0 --value=0 --region=data > Result : true > Key Class : java.lang.String > Key : 0 > Value Class : java.lang.String > Old Value : > {noformat} > {noformat} > gfsh>describe lucene index --name=∆∆∆ --region=/data > Index Name | Region Path | Server Name | Indexed Fields | Field Analyzer > | Status| Query Executions | Updates | Commits | Documents > -- | --- | --- | -- | > --- | --- | | --- | --- > | - > ∆∆∆| /data | server1 | [text] | > {text=StandardAnalyzer} | Initialized | 0| 0 | 0 > | 0 > ∆∆∆| /data | server2 | [text] | > {text=StandardAnalyzer} | Initialized | 0| 1 | 1 > | 1 > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (GEODE-2950) Lucene index names should be restricted to valid region names since the index name becomes part of a region
[ https://issues.apache.org/jira/browse/GEODE-2950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16025158#comment-16025158 ] ASF subversion and git services commented on GEODE-2950: Commit c793f74c07c3488ba188ed927144be688bd50b19 in geode's branch refs/heads/develop from [~DivineEnder] [ https://git-wip-us.apache.org/repos/asf?p=geode.git;h=c793f74 ] GEODE-2950: Adding validation checks on create lucene index parameter names This closes #532 > Lucene index names should be restricted to valid region names since the index > name becomes part of a region > --- > > Key: GEODE-2950 > URL: https://issues.apache.org/jira/browse/GEODE-2950 > Project: Geode > Issue Type: Bug > Components: lucene >Reporter: Barry Oglesby >Assignee: David Anuta > > Currently, invalid region name characters can be used as index names. The > index name becomes part of the async event queue id which becomes part of the > colocated region name, so invalid characters shouldn't be allowed as index > names. LocalRegion has a validateRegionName method that restricts the names > to {{\[aA-zZ0-9-_.\]+}}. This method should be called to validate index names. > Here is an example (option-j creates the ∆): > {noformat} > gfsh>create lucene index --name=∆∆∆ --region=data --field=text > Member| Status > --- | - > 192.168.2.4(server2:53308):1025 | Successfully created lucene index > 192.168.2.4(server1:53315):1026 | Successfully created lucene index > {noformat} > {noformat} > gfsh>create region --name=data --type=PARTITION > Member | Status > --- | --- > server2 | Region "/data" created on "server2" > server1 | Region "/data" created on "server1" > {noformat} > {noformat} > gfsh>put --key=0 --value=0 --region=data > Result : true > Key Class : java.lang.String > Key : 0 > Value Class : java.lang.String > Old Value : > {noformat} > {noformat} > gfsh>describe lucene index --name=∆∆∆ --region=/data > Index Name | Region Path | Server Name | Indexed Fields | Field Analyzer > | Status| Query Executions | Updates | Commits | Documents > -- | --- | --- | -- | > --- | --- | | --- | --- > | - > ∆∆∆| /data | server1 | [text] | > {text=StandardAnalyzer} | Initialized | 0| 0 | 0 > | 0 > ∆∆∆| /data | server2 | [text] | > {text=StandardAnalyzer} | Initialized | 0| 1 | 1 > | 1 > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (GEODE-2950) Lucene index names should be restricted to valid region names since the index name becomes part of a region
[ https://issues.apache.org/jira/browse/GEODE-2950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16023877#comment-16023877 ] ASF GitHub Bot commented on GEODE-2950: --- Github user DivineEnder commented on the issue: https://github.com/apache/geode/pull/532 @ladyVader @nabarunnag @boglesby @jhuynh1 @upthewaterspout @gesterzhou > Lucene index names should be restricted to valid region names since the index > name becomes part of a region > --- > > Key: GEODE-2950 > URL: https://issues.apache.org/jira/browse/GEODE-2950 > Project: Geode > Issue Type: Bug > Components: lucene >Reporter: Barry Oglesby >Assignee: David Anuta > > Currently, invalid region name characters can be used as index names. The > index name becomes part of the async event queue id which becomes part of the > colocated region name, so invalid characters shouldn't be allowed as index > names. LocalRegion has a validateRegionName method that restricts the names > to {{\[aA-zZ0-9-_.\]+}}. This method should be called to validate index names. > Here is an example (option-j creates the ∆): > {noformat} > gfsh>create lucene index --name=∆∆∆ --region=data --field=text > Member| Status > --- | - > 192.168.2.4(server2:53308):1025 | Successfully created lucene index > 192.168.2.4(server1:53315):1026 | Successfully created lucene index > {noformat} > {noformat} > gfsh>create region --name=data --type=PARTITION > Member | Status > --- | --- > server2 | Region "/data" created on "server2" > server1 | Region "/data" created on "server1" > {noformat} > {noformat} > gfsh>put --key=0 --value=0 --region=data > Result : true > Key Class : java.lang.String > Key : 0 > Value Class : java.lang.String > Old Value : > {noformat} > {noformat} > gfsh>describe lucene index --name=∆∆∆ --region=/data > Index Name | Region Path | Server Name | Indexed Fields | Field Analyzer > | Status| Query Executions | Updates | Commits | Documents > -- | --- | --- | -- | > --- | --- | | --- | --- > | - > ∆∆∆| /data | server1 | [text] | > {text=StandardAnalyzer} | Initialized | 0| 0 | 0 > | 0 > ∆∆∆| /data | server2 | [text] | > {text=StandardAnalyzer} | Initialized | 0| 1 | 1 > | 1 > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (GEODE-2950) Lucene index names should be restricted to valid region names since the index name becomes part of a region
[ https://issues.apache.org/jira/browse/GEODE-2950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16023875#comment-16023875 ] ASF GitHub Bot commented on GEODE-2950: --- GitHub user DivineEnder opened a pull request: https://github.com/apache/geode/pull/532 GEODE-2950: Adding validation checks on create Lucene index parameter… … names Thank you for submitting a contribution to Apache Geode. In order to streamline the review of the contribution we ask you to ensure the following steps have been taken: ### For all changes: - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message? - [ ] Has your PR been rebased against the latest commit within the target branch (typically `develop`)? - [ ] Is your initial contribution a single, squashed commit? - [ ] Does `gradlew build` run cleanly? - [ ] Have you written or updated unit tests to verify your changes? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? ### Note: Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible. If you need help, please send an email to dev@geode.apache.org. You can merge this pull request into a Git repository by running: $ git pull https://github.com/DivineEnder/geode feature/GEODE-2950 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/geode/pull/532.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 #532 commit db35110899adad1372f1f832344608dcf457a639 Author: David AnutaDate: 2017-05-24T23:21:33Z GEODE-2950: Adding validation checks on create lucene index parameter names > Lucene index names should be restricted to valid region names since the index > name becomes part of a region > --- > > Key: GEODE-2950 > URL: https://issues.apache.org/jira/browse/GEODE-2950 > Project: Geode > Issue Type: Bug > Components: lucene >Reporter: Barry Oglesby >Assignee: David Anuta > > Currently, invalid region name characters can be used as index names. The > index name becomes part of the async event queue id which becomes part of the > colocated region name, so invalid characters shouldn't be allowed as index > names. LocalRegion has a validateRegionName method that restricts the names > to {{\[aA-zZ0-9-_.\]+}}. This method should be called to validate index names. > Here is an example (option-j creates the ∆): > {noformat} > gfsh>create lucene index --name=∆∆∆ --region=data --field=text > Member| Status > --- | - > 192.168.2.4(server2:53308):1025 | Successfully created lucene index > 192.168.2.4(server1:53315):1026 | Successfully created lucene index > {noformat} > {noformat} > gfsh>create region --name=data --type=PARTITION > Member | Status > --- | --- > server2 | Region "/data" created on "server2" > server1 | Region "/data" created on "server1" > {noformat} > {noformat} > gfsh>put --key=0 --value=0 --region=data > Result : true > Key Class : java.lang.String > Key : 0 > Value Class : java.lang.String > Old Value : > {noformat} > {noformat} > gfsh>describe lucene index --name=∆∆∆ --region=/data > Index Name | Region Path | Server Name | Indexed Fields | Field Analyzer > | Status| Query Executions | Updates | Commits | Documents > -- | --- | --- | -- | > --- | --- | | --- | --- > | - > ∆∆∆| /data | server1 | [text] | > {text=StandardAnalyzer} | Initialized | 0| 0 | 0 > | 0 > ∆∆∆| /data | server2 | [text] | > {text=StandardAnalyzer} | Initialized | 0| 1 | 1 > | 1 > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346)