[ 
https://issues.apache.org/jira/browse/SOLR-4136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hoss Man updated SOLR-4136:
---------------------------

    Attachment: SOLR-4136.patch


Context...

* 
http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201211.mbox/%3Calpine.DEB.2.02.1211292004430.2543@frisbee%3E
* 
http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201211.mbox/%3c551c5e62-0520-42a2-bf71-165fda360...@gmail.com%3E

Mark's suggestion in that email regarding my original question (about 
prohibiting "/" in nodeNames) was that zkcontroller should replace them "/" 
with "_" -- but that would cause potential collisions between contexts like 
"/foo/solr" and "/foo_solr", so i think using something like URLEncoding makes 
more sense (and shouldn't impact existing ZK cluster state data for most 
existing users)

The attached patch enhances the test base classes to allow for randomized 
hostContext values, and then uses this URLEncoding logic in ZKController to 
build nodeNames -- and in most cases seems to work.  But thinking about "_" in 
paths got me paranoid about explicitly testing that which is how I discovered 
the crufty logic in OverseerCollectionProcessor.  (NOTE: you can see the 
obvious OverseerCollectionProcessor errors trying to talk to the wrong URL in 
the test logs, and they seem to explain the subsequent test failure message, 
but it's also possible there is a subsequent problem i haven't noticed yet)

I haven't dug into this part of the code/problem very much yet, but i *think* 
the right fix here is to clean this up this code so that intead of making 
assumptions about the node name, is uses the clusterstate to lookup the 
base_url from the nodeName.

Logged error (repeated for multiple shards)...

{noformat}
[junit4:junit4]   2> 204647 T33 oasc.SolrException.log SEVERE Collection 
createcollection of awholynewcollection_1 failed
[junit4:junit4]   2> 204686 T31 oasc.DistributedQueue$LatchChildWatcher.process 
Watcher fired on path: /overseer/collection-queue-work state: SyncConnected 
type NodeChildrenChanged
[junit4:junit4]   2> 204688 T33 
oasc.OverseerCollectionProcessor.createCollection Create collection 
awholynewcollection_2 on [127.0.0.1:57855_randctxmqvf%2F_ay, 
127.0.0.1:37463_randctxmqvf%2F_ay]
[junit4:junit4]   2> 204691 T33 
oasc.OverseerCollectionProcessor.createCollection SEVERE Error talking to 
shard: 127.0.0.1:37463/randctxmqvf%2F/ay org.apache.solr.common.SolrException: 
Server at http://127.0.0.1:37463/randctxmqvf%2F/ay returned non ok status:404, 
message:Not Found
[junit4:junit4]   2>    at 
org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:372)
[junit4:junit4]   2>    at 
org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:181)
[junit4:junit4]   2>    at 
org.apache.solr.handler.component.HttpShardHandler$1.call(HttpShardHandler.java:166)
[junit4:junit4]   2>    at 
org.apache.solr.handler.component.HttpShardHandler$1.call(HttpShardHandler.java:133)
[junit4:junit4]   2>    at 
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
{noformat}

Final test failure message...

{noformat}
   <testcase classname="org.apache.solr.cloud.BasicDistributedZkTest" 
name="testDistribSearch" time="268.833">
      <failure message="Could not find new 2 slice collection called 
awholynewcollection_0" 
type="java.lang.AssertionError">java.lang.AssertionError: Could not find new 2 
slice collection called awholynewcollection_0
        at 
__randomizedtesting.SeedInfo.seed([1BD856523B97C07C:9A3ED84A4CC8A040]:0)
        at org.junit.Assert.fail(Assert.java:93)
        at 
org.apache.solr.cloud.BasicDistributedZkTest.checkForCollection(BasicDistributedZkTest.java:1053)
        at 
org.apache.solr.cloud.BasicDistributedZkTest.testCollectionsAPI(BasicDistributedZkTest.java:768)
        at 
org.apache.solr.cloud.BasicDistributedZkTest.doTest(BasicDistributedZkTest.java:361)
        at 
org.apache.solr.BaseDistributedSearchTestCase.testDistribSearch(BaseDistributedSearchTestCase.java:712)
{noformat}


                
> SolrCloud bugs when servlet context contains "/" or "_"
> -------------------------------------------------------
>
>                 Key: SOLR-4136
>                 URL: https://issues.apache.org/jira/browse/SOLR-4136
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>    Affects Versions: 4.0
>            Reporter: Hoss Man
>            Assignee: Hoss Man
>         Attachments: SOLR-4136.patch
>
>
> SolrCloud does not work properly with non-trivial values for "hostContext" 
> (ie: the servlet context path).  In particular...
> * Using a hostContext containing a  "/" (ie: a servlet context with a subdir 
> path, semi-common among people who organize webapps hierarchically for lod 
> blanacer rules) is explicitly forbidden in ZkController because of how the 
> hostContext is used to build a ZK nodeName
> * Using a hostContext containing a "_" causes problems in 
> OverseerCollectionProcessor where it assumes all "_" characters should be 
> converted to "/" to reconstitute a URL from nodeName (NOTE: this code 
> specifically has a TODO to fix this, and then has a subsequent TODO about 
> assuming "http://"; labeled "this sucks")

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to