You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Anurag Sharma (JIRA)" <ji...@apache.org> on 2014/11/02 06:47:34 UTC
[jira] [Commented] (SOLR-6598) Solr Collections API, case
sensitivity of collection name and core's/replica's instance directory
[ https://issues.apache.org/jira/browse/SOLR-6598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14193718#comment-14193718 ]
Anurag Sharma commented on SOLR-6598:
-------------------------------------
I am able to reproducible on windows/cygwin.
Interesting observation, it allows creation creation of 'tEsT' but not 'TEST' after creation of 'test' collection.
{code}
$ curl 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=1&collection.configName=myconf&indent=true&wt=json'
{
"responseHeader":{
"status":0,
"QTime":8565},
"success":{
"":{
"responseHeader":{
"status":0,
"QTime":8003},
"core":"test_shard1_replica1"}}}
$ curl 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=1&collection.configName=myconf&indent=true&wt=json'
{
"responseHeader":{
"status":400,
"QTime":156},
"Operation create caused exception:":"org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: collection already exists: test",
"exception":{
"msg":"collection already exists: test",
"rspCode":400},
"error":{
"msg":"collection already exists: test",
"code":400}}
$ curl 'http://localhost:8983/solr/admin/collections?action=CREATE&name=TEST&numShards=1&collection.configName=myconf&indent=true&wt=json'
{
"responseHeader":{
"status":0,
"QTime":7768},
"failure":{
"":"org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException:Error CREATEing SolrCore 'TEST_shard1_replica1': Unable to create core [TEST_shard1_replica1] Caused by: Lock obtain timed out: NativeFSLock@C:\\work\\trunk\\solr\\node2\\solr\\test_shard1_replica1\\data\\index\\write.lock"}}
$ curl 'http://localhost:8983/solr/admin/collections?action=CREATE&name=TEST1&numShards=1&collection.configName=myconf&indent=true&wt=json'
{
"responseHeader":{
"status":0,
"QTime":6869},
"success":{
"":{
"responseHeader":{
"status":0,
"QTime":6415},
"core":"TEST1_shard1_replica1"}}}
$ curl 'http://localhost:8983/solr/admin/collections?action=CREATE&name=tEsT&numShards=1&collection.configName=myconf&indent=true&wt=json'
{
"responseHeader":{
"status":0,
"QTime":6471},
"success":{
"":{
"responseHeader":{
"status":0,
"QTime":6064},
"core":"tEsT_shard1_replica1"}}}
$ curl 'http://localhost:8983/solr/admin/collections?action=CREATE&name=TEST&numShards=1&collection.configName=myconf&indent=true&wt=json'
{
"responseHeader":{
"status":0,
"QTime":8690},
"failure":{
"":"org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException:Error CREATEing SolrCore 'TEST_shard1_replica1': Unable to create core [TEST_shard1_replica1] Caused by: Lock obtain timed out: NativeFSLock@C:\\work\\trunk\\solr\\node2\\solr\\test_shard1_replica1\\
$ curl 'http://localhost:8983/solr/admin/collections?action=CREATE&name=TEst&numShards=1&collection.configName=myconf&indent=true&wt=json'
{
"responseHeader":{
"status":0,
"QTime":5920},
"failure":{
"":"org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException:Error CREATEing SolrCore 'TEst_shard1_replica1': Unable to create core [TEst_shard1_replica1] Caused by: Lock obtain timed out: NativeFSLock@C:\\work\\trunk\\solr\\node2\\solr\\test_shard1_replica1\\data\\index\\write.lock"}}
$ curl 'http://localhost:8983/solr/admin/collections?action=CREATE&name=Test&numShards=1&collection.configName=myconf&indent=true&wt=json'
{
"responseHeader":{
"status":0,
"QTime":6332},
"failure":{
"":"org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException:Error CREATEing SolrCore 'Test_shard1_replica1': Unable to create core [Test_shard1_replica1] Caused by: Lock obtain timed out: NativeFSLock@C:\\work\\trunk\\solr\\node1\\solr\\tEsT_shard1_replica1\\data\\index\\write.lock"}}
$ curl 'http://localhost:8983/solr/admin/collections?action=CREATE&name=Test1&numShards=1&collection.configName=myconf&indent=true&wt=json'
{
"responseHeader":{
"status":0,
"QTime":6214},
"success":{
"":{
"responseHeader":{
"status":0,
"QTime":5636},
"core":"Test1_shard1_replica1"}}}
{code}
> Solr Collections API, case sensitivity of collection name and core's/replica's instance directory
> -------------------------------------------------------------------------------------------------
>
> Key: SOLR-6598
> URL: https://issues.apache.org/jira/browse/SOLR-6598
> Project: Solr
> Issue Type: Bug
> Components: SolrCloud
> Affects Versions: 4.10.1
> Environment: Mac OS X
> Reporter: Alexey Serba
> Priority: Trivial
>
> Solr Collections API returns misleading error when trying to create two collections with the same name but with different case on MacOS file system (which is case insensitive).
> {noformat}
> sh> curl 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=1&collection.configName=default&indent=true&wt=json'
> {
> "responseHeader":{
> "status":0,
> "QTime":1949},
> "success":{
> "":{
> "responseHeader":{
> "status":0,
> "QTime":1833},
> "core":"test_shard1_replica1"}}}
> sh> curl 'http://localhost:8983/solr/admin/collections?action=CREATE&name=TEST&numShards=1&collection.configName=default&indent=true&wt=json'
> {
> "responseHeader":{
> "status":0,
> "QTime":2509},
> "failure":{
> "":"org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException:Error CREATEing SolrCore 'TEST_shard1_replica1': Unable to create core [TEST_shard1_replica1] Caused by: Lock obtain timed out: NativeFSLock@/Users/alexey/Desktop/solr-4.10.1/node1/solr/test_shard1_replica1/data/index/write.lock"}}
> {noformat}
> See {{Lock obtain timed out}} exception. It will be more user friendly to check existence of instance dir {{test_shard1_replica1}} and return something like "Node A has replica B that uses the same index directory" exception (instead of just trying to hijack that existing directory and then propagating the inexplicable lock exception that arises as a result).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org