[jira] [Commented] (SOLR-8677) SOLR allows creation of shards with invalid names.
[ https://issues.apache.org/jira/browse/SOLR-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15770669#comment-15770669 ] ASF subversion and git services commented on SOLR-8677: --- Commit 7415d100ef09a9a10b45746ebb794452e288ca3a in lucene-solr's branch refs/heads/branch_5x from anshum [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=7415d10 ] Revert "SOLR-8677: Fix assert statement" This reverts commit e8acc04c68ac74ca5757285581c42457100c990c. > SOLR allows creation of shards with invalid names. > -- > > Key: SOLR-8677 > URL: https://issues.apache.org/jira/browse/SOLR-8677 > Project: Solr > Issue Type: Bug >Affects Versions: 6.0 >Reporter: Jason Gerlowski >Assignee: Anshum Gupta >Priority: Minor > Fix For: 6.0 > > Attachments: SOLR-8677-5x-revert.patch, SOLR-8677.patch, > SOLR-8677.patch, SOLR-8677.patch, SOLR-8677.patch > > > Solr currently has "recommendations" about what constitutes a valid > identifier, but doesn't enforce these "recommendations" uniformly. Core > (SOLR-8308) and collection (SOLR-8642) names are currently checked, but > shards aren't. > {code} > $ bin/solr -e cloud -noprompt > > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CREATE&name=coll1&router.name=implicit&numShards=1&shards=bad+shard+name"; > HTTP/1.1 200 OK > Content-Type: application/xml; charset=UTF-8 > Transfer-Encoding: chunked > > > 0 name="QTime">204 name="failure">org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error > from server at http://127.0.1.1:8983/solr: Error CREATEing SolrCore > 'coll1_bad shard name_replica1': Unable to create core [coll1_bad shard > name_replica1] Caused by: Invalid name: 'coll1_bad shard name_replica1' > Identifiers must consist entirely of periods, underscores and > alphanumerics > > {code} > (Note that the CREATE command above returned 200-OK, and the failure was only > apparent when viewing the message.) > A CLUSTERSTATUS shows that the shard was actually created, but has no > underlying cores. > {code} > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS&wt=json&indent=true"; > ... > "collections":{ > "coll1":{ > "replicationFactor":"1", > "shards":{"bad shard name":{ > "range":null, > "state":"active", > "replicas":{}}}, > "router":{"name":"implicit"}, > "maxShardsPerNode":"1", > "autoAddReplicas":"false", > "znodeVersion":1, > "configName":"gettingstarted"}, > ... > {code} > This JIRA proposes adding a check to ensure that shard names meet SOLR's > identifier "recommendations". This should prevent users from accidentally > putting themselves in a bad state. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8677) SOLR allows creation of shards with invalid names.
[ https://issues.apache.org/jira/browse/SOLR-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15770671#comment-15770671 ] ASF subversion and git services commented on SOLR-8677: --- Commit 297b193dec2213dd48cc308ae59ddc0c4845d4d0 in lucene-solr's branch refs/heads/branch_5x from anshum [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=297b193 ] Revert "SOLR-8677: Restrict creation of shards with invalid names" This reverts commit 96c01a2c885871f7d80beddc6e019547639ef71e. > SOLR allows creation of shards with invalid names. > -- > > Key: SOLR-8677 > URL: https://issues.apache.org/jira/browse/SOLR-8677 > Project: Solr > Issue Type: Bug >Affects Versions: 6.0 >Reporter: Jason Gerlowski >Assignee: Anshum Gupta >Priority: Minor > Fix For: 6.0 > > Attachments: SOLR-8677-5x-revert.patch, SOLR-8677.patch, > SOLR-8677.patch, SOLR-8677.patch, SOLR-8677.patch > > > Solr currently has "recommendations" about what constitutes a valid > identifier, but doesn't enforce these "recommendations" uniformly. Core > (SOLR-8308) and collection (SOLR-8642) names are currently checked, but > shards aren't. > {code} > $ bin/solr -e cloud -noprompt > > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CREATE&name=coll1&router.name=implicit&numShards=1&shards=bad+shard+name"; > HTTP/1.1 200 OK > Content-Type: application/xml; charset=UTF-8 > Transfer-Encoding: chunked > > > 0 name="QTime">204 name="failure">org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error > from server at http://127.0.1.1:8983/solr: Error CREATEing SolrCore > 'coll1_bad shard name_replica1': Unable to create core [coll1_bad shard > name_replica1] Caused by: Invalid name: 'coll1_bad shard name_replica1' > Identifiers must consist entirely of periods, underscores and > alphanumerics > > {code} > (Note that the CREATE command above returned 200-OK, and the failure was only > apparent when viewing the message.) > A CLUSTERSTATUS shows that the shard was actually created, but has no > underlying cores. > {code} > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS&wt=json&indent=true"; > ... > "collections":{ > "coll1":{ > "replicationFactor":"1", > "shards":{"bad shard name":{ > "range":null, > "state":"active", > "replicas":{}}}, > "router":{"name":"implicit"}, > "maxShardsPerNode":"1", > "autoAddReplicas":"false", > "znodeVersion":1, > "configName":"gettingstarted"}, > ... > {code} > This JIRA proposes adding a check to ensure that shard names meet SOLR's > identifier "recommendations". This should prevent users from accidentally > putting themselves in a bad state. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8677) SOLR allows creation of shards with invalid names.
[ https://issues.apache.org/jira/browse/SOLR-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15770670#comment-15770670 ] ASF subversion and git services commented on SOLR-8677: --- Commit 69a8aa77e36216b329dc159c391ad2f0155de740 in lucene-solr's branch refs/heads/branch_5x from anshum [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=69a8aa7 ] Revert "SOLR-8677: Fix broken build" This reverts commit 55162f2255a1f707603cc81134996cfb2a5968ec. > SOLR allows creation of shards with invalid names. > -- > > Key: SOLR-8677 > URL: https://issues.apache.org/jira/browse/SOLR-8677 > Project: Solr > Issue Type: Bug >Affects Versions: 6.0 >Reporter: Jason Gerlowski >Assignee: Anshum Gupta >Priority: Minor > Fix For: 6.0 > > Attachments: SOLR-8677-5x-revert.patch, SOLR-8677.patch, > SOLR-8677.patch, SOLR-8677.patch, SOLR-8677.patch > > > Solr currently has "recommendations" about what constitutes a valid > identifier, but doesn't enforce these "recommendations" uniformly. Core > (SOLR-8308) and collection (SOLR-8642) names are currently checked, but > shards aren't. > {code} > $ bin/solr -e cloud -noprompt > > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CREATE&name=coll1&router.name=implicit&numShards=1&shards=bad+shard+name"; > HTTP/1.1 200 OK > Content-Type: application/xml; charset=UTF-8 > Transfer-Encoding: chunked > > > 0 name="QTime">204 name="failure">org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error > from server at http://127.0.1.1:8983/solr: Error CREATEing SolrCore > 'coll1_bad shard name_replica1': Unable to create core [coll1_bad shard > name_replica1] Caused by: Invalid name: 'coll1_bad shard name_replica1' > Identifiers must consist entirely of periods, underscores and > alphanumerics > > {code} > (Note that the CREATE command above returned 200-OK, and the failure was only > apparent when viewing the message.) > A CLUSTERSTATUS shows that the shard was actually created, but has no > underlying cores. > {code} > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS&wt=json&indent=true"; > ... > "collections":{ > "coll1":{ > "replicationFactor":"1", > "shards":{"bad shard name":{ > "range":null, > "state":"active", > "replicas":{}}}, > "router":{"name":"implicit"}, > "maxShardsPerNode":"1", > "autoAddReplicas":"false", > "znodeVersion":1, > "configName":"gettingstarted"}, > ... > {code} > This JIRA proposes adding a check to ensure that shard names meet SOLR's > identifier "recommendations". This should prevent users from accidentally > putting themselves in a bad state. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8677) SOLR allows creation of shards with invalid names.
[ https://issues.apache.org/jira/browse/SOLR-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15745232#comment-15745232 ] Erick Erickson commented on SOLR-8677: -- [~anshumg] I ran across this, can we close it out now? > SOLR allows creation of shards with invalid names. > -- > > Key: SOLR-8677 > URL: https://issues.apache.org/jira/browse/SOLR-8677 > Project: Solr > Issue Type: Bug >Affects Versions: 6.0 >Reporter: Jason Gerlowski >Assignee: Anshum Gupta >Priority: Minor > Fix For: 6.0 > > Attachments: SOLR-8677.patch, SOLR-8677.patch, SOLR-8677.patch, > SOLR-8677.patch > > > Solr currently has "recommendations" about what constitutes a valid > identifier, but doesn't enforce these "recommendations" uniformly. Core > (SOLR-8308) and collection (SOLR-8642) names are currently checked, but > shards aren't. > {code} > $ bin/solr -e cloud -noprompt > > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CREATE&name=coll1&router.name=implicit&numShards=1&shards=bad+shard+name"; > HTTP/1.1 200 OK > Content-Type: application/xml; charset=UTF-8 > Transfer-Encoding: chunked > > > 0 name="QTime">204 name="failure">org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error > from server at http://127.0.1.1:8983/solr: Error CREATEing SolrCore > 'coll1_bad shard name_replica1': Unable to create core [coll1_bad shard > name_replica1] Caused by: Invalid name: 'coll1_bad shard name_replica1' > Identifiers must consist entirely of periods, underscores and > alphanumerics > > {code} > (Note that the CREATE command above returned 200-OK, and the failure was only > apparent when viewing the message.) > A CLUSTERSTATUS shows that the shard was actually created, but has no > underlying cores. > {code} > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS&wt=json&indent=true"; > ... > "collections":{ > "coll1":{ > "replicationFactor":"1", > "shards":{"bad shard name":{ > "range":null, > "state":"active", > "replicas":{}}}, > "router":{"name":"implicit"}, > "maxShardsPerNode":"1", > "autoAddReplicas":"false", > "znodeVersion":1, > "configName":"gettingstarted"}, > ... > {code} > This JIRA proposes adding a check to ensure that shard names meet SOLR's > identifier "recommendations". This should prevent users from accidentally > putting themselves in a bad state. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8677) SOLR allows creation of shards with invalid names.
[ https://issues.apache.org/jira/browse/SOLR-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15259576#comment-15259576 ] Anshum Gupta commented on SOLR-8677: This shouldn't have gone to 5x. My bad! I'll revert this so that this isn't released on the 5x line. > SOLR allows creation of shards with invalid names. > -- > > Key: SOLR-8677 > URL: https://issues.apache.org/jira/browse/SOLR-8677 > Project: Solr > Issue Type: Bug >Affects Versions: master >Reporter: Jason Gerlowski >Priority: Minor > Fix For: master, 6.0 > > Attachments: SOLR-8677.patch, SOLR-8677.patch, SOLR-8677.patch, > SOLR-8677.patch > > > Solr currently has "recommendations" about what constitutes a valid > identifier, but doesn't enforce these "recommendations" uniformly. Core > (SOLR-8308) and collection (SOLR-8642) names are currently checked, but > shards aren't. > {code} > $ bin/solr -e cloud -noprompt > > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CREATE&name=coll1&router.name=implicit&numShards=1&shards=bad+shard+name"; > HTTP/1.1 200 OK > Content-Type: application/xml; charset=UTF-8 > Transfer-Encoding: chunked > > > 0 name="QTime">204 name="failure">org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error > from server at http://127.0.1.1:8983/solr: Error CREATEing SolrCore > 'coll1_bad shard name_replica1': Unable to create core [coll1_bad shard > name_replica1] Caused by: Invalid name: 'coll1_bad shard name_replica1' > Identifiers must consist entirely of periods, underscores and > alphanumerics > > {code} > (Note that the CREATE command above returned 200-OK, and the failure was only > apparent when viewing the message.) > A CLUSTERSTATUS shows that the shard was actually created, but has no > underlying cores. > {code} > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS&wt=json&indent=true"; > ... > "collections":{ > "coll1":{ > "replicationFactor":"1", > "shards":{"bad shard name":{ > "range":null, > "state":"active", > "replicas":{}}}, > "router":{"name":"implicit"}, > "maxShardsPerNode":"1", > "autoAddReplicas":"false", > "znodeVersion":1, > "configName":"gettingstarted"}, > ... > {code} > This JIRA proposes adding a check to ensure that shard names meet SOLR's > identifier "recommendations". This should prevent users from accidentally > putting themselves in a bad state. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8677) SOLR allows creation of shards with invalid names.
[ https://issues.apache.org/jira/browse/SOLR-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15188241#comment-15188241 ] Anshum Gupta commented on SOLR-8677: Done > SOLR allows creation of shards with invalid names. > -- > > Key: SOLR-8677 > URL: https://issues.apache.org/jira/browse/SOLR-8677 > Project: Solr > Issue Type: Bug >Affects Versions: master >Reporter: Jason Gerlowski >Priority: Minor > Fix For: master, 6.0 > > Attachments: SOLR-8677.patch, SOLR-8677.patch, SOLR-8677.patch, > SOLR-8677.patch > > > Solr currently has "recommendations" about what constitutes a valid > identifier, but doesn't enforce these "recommendations" uniformly. Core > (SOLR-8308) and collection (SOLR-8642) names are currently checked, but > shards aren't. > {code} > $ bin/solr -e cloud -noprompt > > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CREATE&name=coll1&router.name=implicit&numShards=1&shards=bad+shard+name"; > HTTP/1.1 200 OK > Content-Type: application/xml; charset=UTF-8 > Transfer-Encoding: chunked > > > 0 name="QTime">204 name="failure">org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error > from server at http://127.0.1.1:8983/solr: Error CREATEing SolrCore > 'coll1_bad shard name_replica1': Unable to create core [coll1_bad shard > name_replica1] Caused by: Invalid name: 'coll1_bad shard name_replica1' > Identifiers must consist entirely of periods, underscores and > alphanumerics > > {code} > (Note that the CREATE command above returned 200-OK, and the failure was only > apparent when viewing the message.) > A CLUSTERSTATUS shows that the shard was actually created, but has no > underlying cores. > {code} > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS&wt=json&indent=true"; > ... > "collections":{ > "coll1":{ > "replicationFactor":"1", > "shards":{"bad shard name":{ > "range":null, > "state":"active", > "replicas":{}}}, > "router":{"name":"implicit"}, > "maxShardsPerNode":"1", > "autoAddReplicas":"false", > "znodeVersion":1, > "configName":"gettingstarted"}, > ... > {code} > This JIRA proposes adding a check to ensure that shard names meet SOLR's > identifier "recommendations". This should prevent users from accidentally > putting themselves in a bad state. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8677) SOLR allows creation of shards with invalid names.
[ https://issues.apache.org/jira/browse/SOLR-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15188193#comment-15188193 ] Erick Erickson commented on SOLR-8677: -- [~anshumg] Can this be closed out? > SOLR allows creation of shards with invalid names. > -- > > Key: SOLR-8677 > URL: https://issues.apache.org/jira/browse/SOLR-8677 > Project: Solr > Issue Type: Bug >Affects Versions: master >Reporter: Jason Gerlowski >Priority: Minor > Fix For: master > > Attachments: SOLR-8677.patch, SOLR-8677.patch, SOLR-8677.patch, > SOLR-8677.patch > > > Solr currently has "recommendations" about what constitutes a valid > identifier, but doesn't enforce these "recommendations" uniformly. Core > (SOLR-8308) and collection (SOLR-8642) names are currently checked, but > shards aren't. > {code} > $ bin/solr -e cloud -noprompt > > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CREATE&name=coll1&router.name=implicit&numShards=1&shards=bad+shard+name"; > HTTP/1.1 200 OK > Content-Type: application/xml; charset=UTF-8 > Transfer-Encoding: chunked > > > 0 name="QTime">204 name="failure">org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error > from server at http://127.0.1.1:8983/solr: Error CREATEing SolrCore > 'coll1_bad shard name_replica1': Unable to create core [coll1_bad shard > name_replica1] Caused by: Invalid name: 'coll1_bad shard name_replica1' > Identifiers must consist entirely of periods, underscores and > alphanumerics > > {code} > (Note that the CREATE command above returned 200-OK, and the failure was only > apparent when viewing the message.) > A CLUSTERSTATUS shows that the shard was actually created, but has no > underlying cores. > {code} > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS&wt=json&indent=true"; > ... > "collections":{ > "coll1":{ > "replicationFactor":"1", > "shards":{"bad shard name":{ > "range":null, > "state":"active", > "replicas":{}}}, > "router":{"name":"implicit"}, > "maxShardsPerNode":"1", > "autoAddReplicas":"false", > "znodeVersion":1, > "configName":"gettingstarted"}, > ... > {code} > This JIRA proposes adding a check to ensure that shard names meet SOLR's > identifier "recommendations". This should prevent users from accidentally > putting themselves in a bad state. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8677) SOLR allows creation of shards with invalid names.
[ https://issues.apache.org/jira/browse/SOLR-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15153872#comment-15153872 ] ASF subversion and git services commented on SOLR-8677: --- Commit 55162f2255a1f707603cc81134996cfb2a5968ec in lucene-solr's branch refs/heads/branch_5x from anshum [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=55162f2 ] SOLR-8677: Fix broken build > SOLR allows creation of shards with invalid names. > -- > > Key: SOLR-8677 > URL: https://issues.apache.org/jira/browse/SOLR-8677 > Project: Solr > Issue Type: Bug >Affects Versions: master >Reporter: Jason Gerlowski >Priority: Minor > Fix For: master > > Attachments: SOLR-8677.patch, SOLR-8677.patch, SOLR-8677.patch, > SOLR-8677.patch > > > Solr currently has "recommendations" about what constitutes a valid > identifier, but doesn't enforce these "recommendations" uniformly. Core > (SOLR-8308) and collection (SOLR-8642) names are currently checked, but > shards aren't. > {code} > $ bin/solr -e cloud -noprompt > > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CREATE&name=coll1&router.name=implicit&numShards=1&shards=bad+shard+name"; > HTTP/1.1 200 OK > Content-Type: application/xml; charset=UTF-8 > Transfer-Encoding: chunked > > > 0 name="QTime">204 name="failure">org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error > from server at http://127.0.1.1:8983/solr: Error CREATEing SolrCore > 'coll1_bad shard name_replica1': Unable to create core [coll1_bad shard > name_replica1] Caused by: Invalid name: 'coll1_bad shard name_replica1' > Identifiers must consist entirely of periods, underscores and > alphanumerics > > {code} > (Note that the CREATE command above returned 200-OK, and the failure was only > apparent when viewing the message.) > A CLUSTERSTATUS shows that the shard was actually created, but has no > underlying cores. > {code} > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS&wt=json&indent=true"; > ... > "collections":{ > "coll1":{ > "replicationFactor":"1", > "shards":{"bad shard name":{ > "range":null, > "state":"active", > "replicas":{}}}, > "router":{"name":"implicit"}, > "maxShardsPerNode":"1", > "autoAddReplicas":"false", > "znodeVersion":1, > "configName":"gettingstarted"}, > ... > {code} > This JIRA proposes adding a check to ensure that shard names meet SOLR's > identifier "recommendations". This should prevent users from accidentally > putting themselves in a bad state. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8677) SOLR allows creation of shards with invalid names.
[ https://issues.apache.org/jira/browse/SOLR-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15153873#comment-15153873 ] ASF subversion and git services commented on SOLR-8677: --- Commit 9b9a64a9d6a6b334c93ae18dbc8da534f4198b22 in lucene-solr's branch refs/heads/branch_5x from anshum [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=9b9a64a ] SOLR-8677: Fix broken build > SOLR allows creation of shards with invalid names. > -- > > Key: SOLR-8677 > URL: https://issues.apache.org/jira/browse/SOLR-8677 > Project: Solr > Issue Type: Bug >Affects Versions: master >Reporter: Jason Gerlowski >Priority: Minor > Fix For: master > > Attachments: SOLR-8677.patch, SOLR-8677.patch, SOLR-8677.patch, > SOLR-8677.patch > > > Solr currently has "recommendations" about what constitutes a valid > identifier, but doesn't enforce these "recommendations" uniformly. Core > (SOLR-8308) and collection (SOLR-8642) names are currently checked, but > shards aren't. > {code} > $ bin/solr -e cloud -noprompt > > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CREATE&name=coll1&router.name=implicit&numShards=1&shards=bad+shard+name"; > HTTP/1.1 200 OK > Content-Type: application/xml; charset=UTF-8 > Transfer-Encoding: chunked > > > 0 name="QTime">204 name="failure">org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error > from server at http://127.0.1.1:8983/solr: Error CREATEing SolrCore > 'coll1_bad shard name_replica1': Unable to create core [coll1_bad shard > name_replica1] Caused by: Invalid name: 'coll1_bad shard name_replica1' > Identifiers must consist entirely of periods, underscores and > alphanumerics > > {code} > (Note that the CREATE command above returned 200-OK, and the failure was only > apparent when viewing the message.) > A CLUSTERSTATUS shows that the shard was actually created, but has no > underlying cores. > {code} > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS&wt=json&indent=true"; > ... > "collections":{ > "coll1":{ > "replicationFactor":"1", > "shards":{"bad shard name":{ > "range":null, > "state":"active", > "replicas":{}}}, > "router":{"name":"implicit"}, > "maxShardsPerNode":"1", > "autoAddReplicas":"false", > "znodeVersion":1, > "configName":"gettingstarted"}, > ... > {code} > This JIRA proposes adding a check to ensure that shard names meet SOLR's > identifier "recommendations". This should prevent users from accidentally > putting themselves in a bad state. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8677) SOLR allows creation of shards with invalid names.
[ https://issues.apache.org/jira/browse/SOLR-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15153871#comment-15153871 ] ASF subversion and git services commented on SOLR-8677: --- Commit 96c01a2c885871f7d80beddc6e019547639ef71e in lucene-solr's branch refs/heads/branch_5x from anshum [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=96c01a2 ] SOLR-8677: Restrict creation of shards with invalid names > SOLR allows creation of shards with invalid names. > -- > > Key: SOLR-8677 > URL: https://issues.apache.org/jira/browse/SOLR-8677 > Project: Solr > Issue Type: Bug >Affects Versions: master >Reporter: Jason Gerlowski >Priority: Minor > Fix For: master > > Attachments: SOLR-8677.patch, SOLR-8677.patch, SOLR-8677.patch, > SOLR-8677.patch > > > Solr currently has "recommendations" about what constitutes a valid > identifier, but doesn't enforce these "recommendations" uniformly. Core > (SOLR-8308) and collection (SOLR-8642) names are currently checked, but > shards aren't. > {code} > $ bin/solr -e cloud -noprompt > > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CREATE&name=coll1&router.name=implicit&numShards=1&shards=bad+shard+name"; > HTTP/1.1 200 OK > Content-Type: application/xml; charset=UTF-8 > Transfer-Encoding: chunked > > > 0 name="QTime">204 name="failure">org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error > from server at http://127.0.1.1:8983/solr: Error CREATEing SolrCore > 'coll1_bad shard name_replica1': Unable to create core [coll1_bad shard > name_replica1] Caused by: Invalid name: 'coll1_bad shard name_replica1' > Identifiers must consist entirely of periods, underscores and > alphanumerics > > {code} > (Note that the CREATE command above returned 200-OK, and the failure was only > apparent when viewing the message.) > A CLUSTERSTATUS shows that the shard was actually created, but has no > underlying cores. > {code} > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS&wt=json&indent=true"; > ... > "collections":{ > "coll1":{ > "replicationFactor":"1", > "shards":{"bad shard name":{ > "range":null, > "state":"active", > "replicas":{}}}, > "router":{"name":"implicit"}, > "maxShardsPerNode":"1", > "autoAddReplicas":"false", > "znodeVersion":1, > "configName":"gettingstarted"}, > ... > {code} > This JIRA proposes adding a check to ensure that shard names meet SOLR's > identifier "recommendations". This should prevent users from accidentally > putting themselves in a bad state. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8677) SOLR allows creation of shards with invalid names.
[ https://issues.apache.org/jira/browse/SOLR-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15153874#comment-15153874 ] ASF subversion and git services commented on SOLR-8677: --- Commit e8acc04c68ac74ca5757285581c42457100c990c in lucene-solr's branch refs/heads/branch_5x from anshum [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=e8acc04 ] SOLR-8677: Fix assert statement > SOLR allows creation of shards with invalid names. > -- > > Key: SOLR-8677 > URL: https://issues.apache.org/jira/browse/SOLR-8677 > Project: Solr > Issue Type: Bug >Affects Versions: master >Reporter: Jason Gerlowski >Priority: Minor > Fix For: master > > Attachments: SOLR-8677.patch, SOLR-8677.patch, SOLR-8677.patch, > SOLR-8677.patch > > > Solr currently has "recommendations" about what constitutes a valid > identifier, but doesn't enforce these "recommendations" uniformly. Core > (SOLR-8308) and collection (SOLR-8642) names are currently checked, but > shards aren't. > {code} > $ bin/solr -e cloud -noprompt > > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CREATE&name=coll1&router.name=implicit&numShards=1&shards=bad+shard+name"; > HTTP/1.1 200 OK > Content-Type: application/xml; charset=UTF-8 > Transfer-Encoding: chunked > > > 0 name="QTime">204 name="failure">org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error > from server at http://127.0.1.1:8983/solr: Error CREATEing SolrCore > 'coll1_bad shard name_replica1': Unable to create core [coll1_bad shard > name_replica1] Caused by: Invalid name: 'coll1_bad shard name_replica1' > Identifiers must consist entirely of periods, underscores and > alphanumerics > > {code} > (Note that the CREATE command above returned 200-OK, and the failure was only > apparent when viewing the message.) > A CLUSTERSTATUS shows that the shard was actually created, but has no > underlying cores. > {code} > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS&wt=json&indent=true"; > ... > "collections":{ > "coll1":{ > "replicationFactor":"1", > "shards":{"bad shard name":{ > "range":null, > "state":"active", > "replicas":{}}}, > "router":{"name":"implicit"}, > "maxShardsPerNode":"1", > "autoAddReplicas":"false", > "znodeVersion":1, > "configName":"gettingstarted"}, > ... > {code} > This JIRA proposes adding a check to ensure that shard names meet SOLR's > identifier "recommendations". This should prevent users from accidentally > putting themselves in a bad state. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8677) SOLR allows creation of shards with invalid names.
[ https://issues.apache.org/jira/browse/SOLR-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15153596#comment-15153596 ] ASF subversion and git services commented on SOLR-8677: --- Commit eb0e270043f7e83c06683043a4fb642b4f04b485 in lucene-solr's branch refs/heads/master from anshum [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=eb0e270 ] SOLR-8677: Fix assert statement > SOLR allows creation of shards with invalid names. > -- > > Key: SOLR-8677 > URL: https://issues.apache.org/jira/browse/SOLR-8677 > Project: Solr > Issue Type: Bug >Affects Versions: master >Reporter: Jason Gerlowski >Priority: Minor > Fix For: master > > Attachments: SOLR-8677.patch, SOLR-8677.patch, SOLR-8677.patch, > SOLR-8677.patch > > > Solr currently has "recommendations" about what constitutes a valid > identifier, but doesn't enforce these "recommendations" uniformly. Core > (SOLR-8308) and collection (SOLR-8642) names are currently checked, but > shards aren't. > {code} > $ bin/solr -e cloud -noprompt > > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CREATE&name=coll1&router.name=implicit&numShards=1&shards=bad+shard+name"; > HTTP/1.1 200 OK > Content-Type: application/xml; charset=UTF-8 > Transfer-Encoding: chunked > > > 0 name="QTime">204 name="failure">org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error > from server at http://127.0.1.1:8983/solr: Error CREATEing SolrCore > 'coll1_bad shard name_replica1': Unable to create core [coll1_bad shard > name_replica1] Caused by: Invalid name: 'coll1_bad shard name_replica1' > Identifiers must consist entirely of periods, underscores and > alphanumerics > > {code} > (Note that the CREATE command above returned 200-OK, and the failure was only > apparent when viewing the message.) > A CLUSTERSTATUS shows that the shard was actually created, but has no > underlying cores. > {code} > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS&wt=json&indent=true"; > ... > "collections":{ > "coll1":{ > "replicationFactor":"1", > "shards":{"bad shard name":{ > "range":null, > "state":"active", > "replicas":{}}}, > "router":{"name":"implicit"}, > "maxShardsPerNode":"1", > "autoAddReplicas":"false", > "znodeVersion":1, > "configName":"gettingstarted"}, > ... > {code} > This JIRA proposes adding a check to ensure that shard names meet SOLR's > identifier "recommendations". This should prevent users from accidentally > putting themselves in a bad state. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8677) SOLR allows creation of shards with invalid names.
[ https://issues.apache.org/jira/browse/SOLR-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15153545#comment-15153545 ] ASF subversion and git services commented on SOLR-8677: --- Commit c7c5b8fe498408fb28911272986b119fc3ab563f in lucene-solr's branch refs/heads/master from anshum [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=c7c5b8f ] SOLR-8677: Fix broken build > SOLR allows creation of shards with invalid names. > -- > > Key: SOLR-8677 > URL: https://issues.apache.org/jira/browse/SOLR-8677 > Project: Solr > Issue Type: Bug >Affects Versions: master >Reporter: Jason Gerlowski >Priority: Minor > Fix For: master > > Attachments: SOLR-8677.patch, SOLR-8677.patch, SOLR-8677.patch, > SOLR-8677.patch > > > Solr currently has "recommendations" about what constitutes a valid > identifier, but doesn't enforce these "recommendations" uniformly. Core > (SOLR-8308) and collection (SOLR-8642) names are currently checked, but > shards aren't. > {code} > $ bin/solr -e cloud -noprompt > > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CREATE&name=coll1&router.name=implicit&numShards=1&shards=bad+shard+name"; > HTTP/1.1 200 OK > Content-Type: application/xml; charset=UTF-8 > Transfer-Encoding: chunked > > > 0 name="QTime">204 name="failure">org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error > from server at http://127.0.1.1:8983/solr: Error CREATEing SolrCore > 'coll1_bad shard name_replica1': Unable to create core [coll1_bad shard > name_replica1] Caused by: Invalid name: 'coll1_bad shard name_replica1' > Identifiers must consist entirely of periods, underscores and > alphanumerics > > {code} > (Note that the CREATE command above returned 200-OK, and the failure was only > apparent when viewing the message.) > A CLUSTERSTATUS shows that the shard was actually created, but has no > underlying cores. > {code} > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS&wt=json&indent=true"; > ... > "collections":{ > "coll1":{ > "replicationFactor":"1", > "shards":{"bad shard name":{ > "range":null, > "state":"active", > "replicas":{}}}, > "router":{"name":"implicit"}, > "maxShardsPerNode":"1", > "autoAddReplicas":"false", > "znodeVersion":1, > "configName":"gettingstarted"}, > ... > {code} > This JIRA proposes adding a check to ensure that shard names meet SOLR's > identifier "recommendations". This should prevent users from accidentally > putting themselves in a bad state. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8677) SOLR allows creation of shards with invalid names.
[ https://issues.apache.org/jira/browse/SOLR-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15153402#comment-15153402 ] ASF subversion and git services commented on SOLR-8677: --- Commit a54e819a6272830098cb50ec1abd75f2501d4993 in lucene-solr's branch refs/heads/master from anshum [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=a54e819 ] SOLR-8677: Fix broken build > SOLR allows creation of shards with invalid names. > -- > > Key: SOLR-8677 > URL: https://issues.apache.org/jira/browse/SOLR-8677 > Project: Solr > Issue Type: Bug >Affects Versions: master >Reporter: Jason Gerlowski >Priority: Minor > Fix For: master > > Attachments: SOLR-8677.patch, SOLR-8677.patch, SOLR-8677.patch, > SOLR-8677.patch > > > Solr currently has "recommendations" about what constitutes a valid > identifier, but doesn't enforce these "recommendations" uniformly. Core > (SOLR-8308) and collection (SOLR-8642) names are currently checked, but > shards aren't. > {code} > $ bin/solr -e cloud -noprompt > > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CREATE&name=coll1&router.name=implicit&numShards=1&shards=bad+shard+name"; > HTTP/1.1 200 OK > Content-Type: application/xml; charset=UTF-8 > Transfer-Encoding: chunked > > > 0 name="QTime">204 name="failure">org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error > from server at http://127.0.1.1:8983/solr: Error CREATEing SolrCore > 'coll1_bad shard name_replica1': Unable to create core [coll1_bad shard > name_replica1] Caused by: Invalid name: 'coll1_bad shard name_replica1' > Identifiers must consist entirely of periods, underscores and > alphanumerics > > {code} > (Note that the CREATE command above returned 200-OK, and the failure was only > apparent when viewing the message.) > A CLUSTERSTATUS shows that the shard was actually created, but has no > underlying cores. > {code} > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS&wt=json&indent=true"; > ... > "collections":{ > "coll1":{ > "replicationFactor":"1", > "shards":{"bad shard name":{ > "range":null, > "state":"active", > "replicas":{}}}, > "router":{"name":"implicit"}, > "maxShardsPerNode":"1", > "autoAddReplicas":"false", > "znodeVersion":1, > "configName":"gettingstarted"}, > ... > {code} > This JIRA proposes adding a check to ensure that shard names meet SOLR's > identifier "recommendations". This should prevent users from accidentally > putting themselves in a bad state. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8677) SOLR allows creation of shards with invalid names.
[ https://issues.apache.org/jira/browse/SOLR-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15153325#comment-15153325 ] ASF subversion and git services commented on SOLR-8677: --- Commit d01230d6394b29fa6fd42377404c0c03d6e8a4d9 in lucene-solr's branch refs/heads/master from anshum [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=d01230d ] SOLR-8677: Restrict creation of shards with invalid names > SOLR allows creation of shards with invalid names. > -- > > Key: SOLR-8677 > URL: https://issues.apache.org/jira/browse/SOLR-8677 > Project: Solr > Issue Type: Bug >Affects Versions: master >Reporter: Jason Gerlowski >Priority: Minor > Fix For: master > > Attachments: SOLR-8677.patch, SOLR-8677.patch, SOLR-8677.patch, > SOLR-8677.patch > > > Solr currently has "recommendations" about what constitutes a valid > identifier, but doesn't enforce these "recommendations" uniformly. Core > (SOLR-8308) and collection (SOLR-8642) names are currently checked, but > shards aren't. > {code} > $ bin/solr -e cloud -noprompt > > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CREATE&name=coll1&router.name=implicit&numShards=1&shards=bad+shard+name"; > HTTP/1.1 200 OK > Content-Type: application/xml; charset=UTF-8 > Transfer-Encoding: chunked > > > 0 name="QTime">204 name="failure">org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error > from server at http://127.0.1.1:8983/solr: Error CREATEing SolrCore > 'coll1_bad shard name_replica1': Unable to create core [coll1_bad shard > name_replica1] Caused by: Invalid name: 'coll1_bad shard name_replica1' > Identifiers must consist entirely of periods, underscores and > alphanumerics > > {code} > (Note that the CREATE command above returned 200-OK, and the failure was only > apparent when viewing the message.) > A CLUSTERSTATUS shows that the shard was actually created, but has no > underlying cores. > {code} > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS&wt=json&indent=true"; > ... > "collections":{ > "coll1":{ > "replicationFactor":"1", > "shards":{"bad shard name":{ > "range":null, > "state":"active", > "replicas":{}}}, > "router":{"name":"implicit"}, > "maxShardsPerNode":"1", > "autoAddReplicas":"false", > "znodeVersion":1, > "configName":"gettingstarted"}, > ... > {code} > This JIRA proposes adding a check to ensure that shard names meet SOLR's > identifier "recommendations". This should prevent users from accidentally > putting themselves in a bad state. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8677) SOLR allows creation of shards with invalid names.
[ https://issues.apache.org/jira/browse/SOLR-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15149540#comment-15149540 ] Jason Gerlowski commented on SOLR-8677: --- Good changes. I'd thought about having SolrIdentifierValidator spit out booleans initially, but decided against it back in SOLR-8642, as it'd force callers in Solr to produce their own SolrExceptions by wrapping the call. Pros and cons either way. But now that it gets rid of the duplication I like it better this/your way. Thanks for taking the time to review Anshum. > SOLR allows creation of shards with invalid names. > -- > > Key: SOLR-8677 > URL: https://issues.apache.org/jira/browse/SOLR-8677 > Project: Solr > Issue Type: Bug >Affects Versions: master >Reporter: Jason Gerlowski >Priority: Minor > Fix For: master > > Attachments: SOLR-8677.patch, SOLR-8677.patch, SOLR-8677.patch > > > Solr currently has "recommendations" about what constitutes a valid > identifier, but doesn't enforce these "recommendations" uniformly. Core > (SOLR-8308) and collection (SOLR-8642) names are currently checked, but > shards aren't. > {code} > $ bin/solr -e cloud -noprompt > > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CREATE&name=coll1&router.name=implicit&numShards=1&shards=bad+shard+name"; > HTTP/1.1 200 OK > Content-Type: application/xml; charset=UTF-8 > Transfer-Encoding: chunked > > > 0 name="QTime">204 name="failure">org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error > from server at http://127.0.1.1:8983/solr: Error CREATEing SolrCore > 'coll1_bad shard name_replica1': Unable to create core [coll1_bad shard > name_replica1] Caused by: Invalid name: 'coll1_bad shard name_replica1' > Identifiers must consist entirely of periods, underscores and > alphanumerics > > {code} > (Note that the CREATE command above returned 200-OK, and the failure was only > apparent when viewing the message.) > A CLUSTERSTATUS shows that the shard was actually created, but has no > underlying cores. > {code} > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS&wt=json&indent=true"; > ... > "collections":{ > "coll1":{ > "replicationFactor":"1", > "shards":{"bad shard name":{ > "range":null, > "state":"active", > "replicas":{}}}, > "router":{"name":"implicit"}, > "maxShardsPerNode":"1", > "autoAddReplicas":"false", > "znodeVersion":1, > "configName":"gettingstarted"}, > ... > {code} > This JIRA proposes adding a check to ensure that shard names meet SOLR's > identifier "recommendations". This should prevent users from accidentally > putting themselves in a bad state. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8677) SOLR allows creation of shards with invalid names.
[ https://issues.apache.org/jira/browse/SOLR-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15149451#comment-15149451 ] Anshum Gupta commented on SOLR-8677: bq. This obviously means some duplicated code, since the classes are largely the same other than the exception being thrown. If anyone has suggestions on better ways to structure this, I'd love to hear them. handled in my last patch. bq. I created a new file for these tests (TestCollectionAdminRequest). Wanted to mention it, in case tests for those classes do already exist, and I just missed them. Pretty sure the new file was warranted though. You've added nice unit tests that don't require SolrCloud bootstrapping, so that's perfect. We can also add more tests to CollectionsAPISolrJTests class but it's not really needed so we're good. > SOLR allows creation of shards with invalid names. > -- > > Key: SOLR-8677 > URL: https://issues.apache.org/jira/browse/SOLR-8677 > Project: Solr > Issue Type: Bug >Affects Versions: master >Reporter: Jason Gerlowski >Priority: Minor > Fix For: master > > Attachments: SOLR-8677.patch, SOLR-8677.patch, SOLR-8677.patch > > > Solr currently has "recommendations" about what constitutes a valid > identifier, but doesn't enforce these "recommendations" uniformly. Core > (SOLR-8308) and collection (SOLR-8642) names are currently checked, but > shards aren't. > {code} > $ bin/solr -e cloud -noprompt > > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CREATE&name=coll1&router.name=implicit&numShards=1&shards=bad+shard+name"; > HTTP/1.1 200 OK > Content-Type: application/xml; charset=UTF-8 > Transfer-Encoding: chunked > > > 0 name="QTime">204 name="failure">org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error > from server at http://127.0.1.1:8983/solr: Error CREATEing SolrCore > 'coll1_bad shard name_replica1': Unable to create core [coll1_bad shard > name_replica1] Caused by: Invalid name: 'coll1_bad shard name_replica1' > Identifiers must consist entirely of periods, underscores and > alphanumerics > > {code} > (Note that the CREATE command above returned 200-OK, and the failure was only > apparent when viewing the message.) > A CLUSTERSTATUS shows that the shard was actually created, but has no > underlying cores. > {code} > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS&wt=json&indent=true"; > ... > "collections":{ > "coll1":{ > "replicationFactor":"1", > "shards":{"bad shard name":{ > "range":null, > "state":"active", > "replicas":{}}}, > "router":{"name":"implicit"}, > "maxShardsPerNode":"1", > "autoAddReplicas":"false", > "znodeVersion":1, > "configName":"gettingstarted"}, > ... > {code} > This JIRA proposes adding a check to ensure that shard names meet SOLR's > identifier "recommendations". This should prevent users from accidentally > putting themselves in a bad state. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8677) SOLR allows creation of shards with invalid names.
[ https://issues.apache.org/jira/browse/SOLR-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15146701#comment-15146701 ] Jason Gerlowski commented on SOLR-8677: --- I'll just roll it into this patch. Just wanted to make sure I was doing the right thing process-wise before I start in on it. If it doesn't bother you, it doesn't bother me. I'll push up a new revision shortly. > SOLR allows creation of shards with invalid names. > -- > > Key: SOLR-8677 > URL: https://issues.apache.org/jira/browse/SOLR-8677 > Project: Solr > Issue Type: Bug >Affects Versions: master >Reporter: Jason Gerlowski >Priority: Minor > Fix For: master > > Attachments: SOLR-8677.patch > > > Solr currently has "recommendations" about what constitutes a valid > identifier, but doesn't enforce these "recommendations" uniformly. Core > (SOLR-8308) and collection (SOLR-8642) names are currently checked, but > shards aren't. > {code} > $ bin/solr -e cloud -noprompt > > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CREATE&name=coll1&router.name=implicit&numShards=1&shards=bad+shard+name"; > HTTP/1.1 200 OK > Content-Type: application/xml; charset=UTF-8 > Transfer-Encoding: chunked > > > 0 name="QTime">204 name="failure">org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error > from server at http://127.0.1.1:8983/solr: Error CREATEing SolrCore > 'coll1_bad shard name_replica1': Unable to create core [coll1_bad shard > name_replica1] Caused by: Invalid name: 'coll1_bad shard name_replica1' > Identifiers must consist entirely of periods, underscores and > alphanumerics > > {code} > (Note that the CREATE command above returned 200-OK, and the failure was only > apparent when viewing the message.) > A CLUSTERSTATUS shows that the shard was actually created, but has no > underlying cores. > {code} > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS&wt=json&indent=true"; > ... > "collections":{ > "coll1":{ > "replicationFactor":"1", > "shards":{"bad shard name":{ > "range":null, > "state":"active", > "replicas":{}}}, > "router":{"name":"implicit"}, > "maxShardsPerNode":"1", > "autoAddReplicas":"false", > "znodeVersion":1, > "configName":"gettingstarted"}, > ... > {code} > This JIRA proposes adding a check to ensure that shard names meet SOLR's > identifier "recommendations". This should prevent users from accidentally > putting themselves in a bad state. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8677) SOLR allows creation of shards with invalid names.
[ https://issues.apache.org/jira/browse/SOLR-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15146678#comment-15146678 ] Shai Erera commented on SOLR-8677: -- I don't mind either way Jason. Either you add it to this patch, and with that finish the collection/alias/shard name restrictions handling, or to a new issue, whatever works for you. I assume both will be released only post 5.5 anyway, and thus together. If you prefer to handle that separately, let me know and I'll add a CHANGES entry before committing this patch. > SOLR allows creation of shards with invalid names. > -- > > Key: SOLR-8677 > URL: https://issues.apache.org/jira/browse/SOLR-8677 > Project: Solr > Issue Type: Bug >Affects Versions: master >Reporter: Jason Gerlowski >Priority: Minor > Fix For: master > > Attachments: SOLR-8677.patch > > > Solr currently has "recommendations" about what constitutes a valid > identifier, but doesn't enforce these "recommendations" uniformly. Core > (SOLR-8308) and collection (SOLR-8642) names are currently checked, but > shards aren't. > {code} > $ bin/solr -e cloud -noprompt > > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CREATE&name=coll1&router.name=implicit&numShards=1&shards=bad+shard+name"; > HTTP/1.1 200 OK > Content-Type: application/xml; charset=UTF-8 > Transfer-Encoding: chunked > > > 0 name="QTime">204 name="failure">org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error > from server at http://127.0.1.1:8983/solr: Error CREATEing SolrCore > 'coll1_bad shard name_replica1': Unable to create core [coll1_bad shard > name_replica1] Caused by: Invalid name: 'coll1_bad shard name_replica1' > Identifiers must consist entirely of periods, underscores and > alphanumerics > > {code} > (Note that the CREATE command above returned 200-OK, and the failure was only > apparent when viewing the message.) > A CLUSTERSTATUS shows that the shard was actually created, but has no > underlying cores. > {code} > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS&wt=json&indent=true"; > ... > "collections":{ > "coll1":{ > "replicationFactor":"1", > "shards":{"bad shard name":{ > "range":null, > "state":"active", > "replicas":{}}}, > "router":{"name":"implicit"}, > "maxShardsPerNode":"1", > "autoAddReplicas":"false", > "znodeVersion":1, > "configName":"gettingstarted"}, > ... > {code} > This JIRA proposes adding a check to ensure that shard names meet SOLR's > identifier "recommendations". This should prevent users from accidentally > putting themselves in a bad state. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8677) SOLR allows creation of shards with invalid names.
[ https://issues.apache.org/jira/browse/SOLR-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15146604#comment-15146604 ] Jason Gerlowski commented on SOLR-8677: --- Thanks for the review Shai. Do you want to see that SolrJ change as a part of this JIRA? I'd thought about adding that myself, but I had planned on it being its own JIRA, since as you mentioned it's not strictly related. But if there's no objection to adding it in this patch, I'll just save the overhead and add it here. > SOLR allows creation of shards with invalid names. > -- > > Key: SOLR-8677 > URL: https://issues.apache.org/jira/browse/SOLR-8677 > Project: Solr > Issue Type: Bug >Affects Versions: master >Reporter: Jason Gerlowski >Priority: Minor > Fix For: master > > Attachments: SOLR-8677.patch > > > Solr currently has "recommendations" about what constitutes a valid > identifier, but doesn't enforce these "recommendations" uniformly. Core > (SOLR-8308) and collection (SOLR-8642) names are currently checked, but > shards aren't. > {code} > $ bin/solr -e cloud -noprompt > > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CREATE&name=coll1&router.name=implicit&numShards=1&shards=bad+shard+name"; > HTTP/1.1 200 OK > Content-Type: application/xml; charset=UTF-8 > Transfer-Encoding: chunked > > > 0 name="QTime">204 name="failure">org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error > from server at http://127.0.1.1:8983/solr: Error CREATEing SolrCore > 'coll1_bad shard name_replica1': Unable to create core [coll1_bad shard > name_replica1] Caused by: Invalid name: 'coll1_bad shard name_replica1' > Identifiers must consist entirely of periods, underscores and > alphanumerics > > {code} > (Note that the CREATE command above returned 200-OK, and the failure was only > apparent when viewing the message.) > A CLUSTERSTATUS shows that the shard was actually created, but has no > underlying cores. > {code} > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS&wt=json&indent=true"; > ... > "collections":{ > "coll1":{ > "replicationFactor":"1", > "shards":{"bad shard name":{ > "range":null, > "state":"active", > "replicas":{}}}, > "router":{"name":"implicit"}, > "maxShardsPerNode":"1", > "autoAddReplicas":"false", > "znodeVersion":1, > "configName":"gettingstarted"}, > ... > {code} > This JIRA proposes adding a check to ensure that shard names meet SOLR's > identifier "recommendations". This should prevent users from accidentally > putting themselves in a bad state. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8677) SOLR allows creation of shards with invalid names.
[ https://issues.apache.org/jira/browse/SOLR-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15146459#comment-15146459 ] Shai Erera commented on SOLR-8677: -- Also, would u mind adding a CHANGES.txt entry too? > SOLR allows creation of shards with invalid names. > -- > > Key: SOLR-8677 > URL: https://issues.apache.org/jira/browse/SOLR-8677 > Project: Solr > Issue Type: Bug >Affects Versions: master >Reporter: Jason Gerlowski >Priority: Minor > Fix For: master > > Attachments: SOLR-8677.patch > > > Solr currently has "recommendations" about what constitutes a valid > identifier, but doesn't enforce these "recommendations" uniformly. Core > (SOLR-8308) and collection (SOLR-8642) names are currently checked, but > shards aren't. > {code} > $ bin/solr -e cloud -noprompt > > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CREATE&name=coll1&router.name=implicit&numShards=1&shards=bad+shard+name"; > HTTP/1.1 200 OK > Content-Type: application/xml; charset=UTF-8 > Transfer-Encoding: chunked > > > 0 name="QTime">204 name="failure">org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error > from server at http://127.0.1.1:8983/solr: Error CREATEing SolrCore > 'coll1_bad shard name_replica1': Unable to create core [coll1_bad shard > name_replica1] Caused by: Invalid name: 'coll1_bad shard name_replica1' > Identifiers must consist entirely of periods, underscores and > alphanumerics > > {code} > (Note that the CREATE command above returned 200-OK, and the failure was only > apparent when viewing the message.) > A CLUSTERSTATUS shows that the shard was actually created, but has no > underlying cores. > {code} > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS&wt=json&indent=true"; > ... > "collections":{ > "coll1":{ > "replicationFactor":"1", > "shards":{"bad shard name":{ > "range":null, > "state":"active", > "replicas":{}}}, > "router":{"name":"implicit"}, > "maxShardsPerNode":"1", > "autoAddReplicas":"false", > "znodeVersion":1, > "configName":"gettingstarted"}, > ... > {code} > This JIRA proposes adding a check to ensure that shard names meet SOLR's > identifier "recommendations". This should prevent users from accidentally > putting themselves in a bad state. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8677) SOLR allows creation of shards with invalid names.
[ https://issues.apache.org/jira/browse/SOLR-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15146458#comment-15146458 ] Shai Erera commented on SOLR-8677: -- Looks good to me. [~gerlowskija] I know it's not strictly related to this issue, but perhaps we can use the validator in SolrJ too, short-circuiting alias/collection/shard requests before they reach the server? > SOLR allows creation of shards with invalid names. > -- > > Key: SOLR-8677 > URL: https://issues.apache.org/jira/browse/SOLR-8677 > Project: Solr > Issue Type: Bug >Affects Versions: master >Reporter: Jason Gerlowski >Priority: Minor > Fix For: master > > Attachments: SOLR-8677.patch > > > Solr currently has "recommendations" about what constitutes a valid > identifier, but doesn't enforce these "recommendations" uniformly. Core > (SOLR-8308) and collection (SOLR-8642) names are currently checked, but > shards aren't. > {code} > $ bin/solr -e cloud -noprompt > > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CREATE&name=coll1&router.name=implicit&numShards=1&shards=bad+shard+name"; > HTTP/1.1 200 OK > Content-Type: application/xml; charset=UTF-8 > Transfer-Encoding: chunked > > > 0 name="QTime">204 name="failure">org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error > from server at http://127.0.1.1:8983/solr: Error CREATEing SolrCore > 'coll1_bad shard name_replica1': Unable to create core [coll1_bad shard > name_replica1] Caused by: Invalid name: 'coll1_bad shard name_replica1' > Identifiers must consist entirely of periods, underscores and > alphanumerics > > {code} > (Note that the CREATE command above returned 200-OK, and the failure was only > apparent when viewing the message.) > A CLUSTERSTATUS shows that the shard was actually created, but has no > underlying cores. > {code} > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS&wt=json&indent=true"; > ... > "collections":{ > "coll1":{ > "replicationFactor":"1", > "shards":{"bad shard name":{ > "range":null, > "state":"active", > "replicas":{}}}, > "router":{"name":"implicit"}, > "maxShardsPerNode":"1", > "autoAddReplicas":"false", > "znodeVersion":1, > "configName":"gettingstarted"}, > ... > {code} > This JIRA proposes adding a check to ensure that shard names meet SOLR's > identifier "recommendations". This should prevent users from accidentally > putting themselves in a bad state. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8677) SOLR allows creation of shards with invalid names.
[ https://issues.apache.org/jira/browse/SOLR-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15144989#comment-15144989 ] Jason Gerlowski commented on SOLR-8677: --- This check would need to be put in at least two places: - the {{shards}} parameter of the CREATE collection call. - the {{shard}} parameter of the CREATESHARD call. There may be other places where users can specify the name of a new shard. These are just the two places I found after a quick look. Hoping to upload a patch shortly that can address this behavior. > SOLR allows creation of shards with invalid names. > -- > > Key: SOLR-8677 > URL: https://issues.apache.org/jira/browse/SOLR-8677 > Project: Solr > Issue Type: Bug >Affects Versions: master >Reporter: Jason Gerlowski > Fix For: master > > > Solr currently has "recommendations" about what constitutes a valid > identifier, but doesn't enforce these "recommendations" uniformly. Core > (SOLR-8308) and collection (SOLR-8642) names are currently checked, but > shards aren't. > {code} > $ bin/solr -e cloud -noprompt > > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CREATE&name=coll1&router.name=implicit&numShards=1&shards=bad+shard+name"; > HTTP/1.1 200 OK > Content-Type: application/xml; charset=UTF-8 > Transfer-Encoding: chunked > > > 0 name="QTime">204 name="failure">org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error > from server at http://127.0.1.1:8983/solr: Error CREATEing SolrCore > 'coll1_bad shard name_replica1': Unable to create core [coll1_bad shard > name_replica1] Caused by: Invalid name: 'coll1_bad shard name_replica1' > Identifiers must consist entirely of periods, underscores and > alphanumerics > > {code} > (Note that the CREATE command above returned 200-OK, and the failure was only > apparent when viewing the message.) > A CLUSTERSTATUS shows that the shard was actually created, but has no > underlying cores. > {code} > $ curl -i -l -k -X GET > "http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS&wt=json&indent=true"; > ... > "collections":{ > "coll1":{ > "replicationFactor":"1", > "shards":{"bad shard name":{ > "range":null, > "state":"active", > "replicas":{}}}, > "router":{"name":"implicit"}, > "maxShardsPerNode":"1", > "autoAddReplicas":"false", > "znodeVersion":1, > "configName":"gettingstarted"}, > ... > {code} > This JIRA proposes adding a check to ensure that shard names meet SOLR's > identifier "recommendations". This should prevent users from accidentally > putting themselves in a bad state. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org