lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Per Steffensen (JIRA)" <>
Subject [jira] [Commented] (SOLR-4136) SolrCloud bugs when servlet context contains "/" or "_"
Date Wed, 12 Dec 2012 10:15:21 GMT


Per Steffensen commented on SOLR-4136:

Can confirm that Marks patch for OverseerCollectionProcessorTest seems to be good. In a mocked
test you mock components used by the "class under test" (OverseerCollectionProcessor in this
case) and basically tells those mocks how to behave when used by the "class under test". This
way you test only the logic in the "class under test" and at the same time you get to verify
that it communicates (calles stuff on) the components in interacts with (the mocked ones)
in exactly the way you expect. I guess you have changed createCollection so that it also calls
zkStateReaderMock.getZkClient().getBaseUrlForNodeName() which it didnt before, so that call
wasnt "expected" by the test and you didnt tell the mocked component (ZkStateReader) how to
"simulate" correct behaviour. Mark added this and the test should be fine again. 

Basically since you changed createCollection in a way so that it did not anylonger behave
exactly as verified by the OverseerCollectionProcessorTest you needed to tweak the test also.
This is a nice thing!
> SolrCloud bugs when servlet context contains "/" or "_"
> -------------------------------------------------------
>                 Key: SOLR-4136
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>    Affects Versions: 4.0
>            Reporter: Hoss Man
>            Assignee: Hoss Man
>         Attachments: SOLR-4136.patch, SOLR-4136.patch, SOLR-4136.patch, 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:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message