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

Erick Erickson updated SOLR-4982:
---------------------------------

    Attachment: SOLR-4982.patch

Along the way, I wondered "gee, what happens if we create a core in discovery 
mode?" Well, we don't preserve properties passed on the URL. This patch 
preserves any parameters passed in on the admin URL, e.g. dataDir, config etc.

Oddly, you have to specify instanceDir even though it isn't a valid property 
for core.properties, else how do we let the user specify something not 
immediately below <solrhome>?

But my remaining problem is that I can't exit the test gracefully, searchers 
are left hanging and we get the partial stack trace below.

This usually means we did a CoreContainer.get and no corresponding close, but 
there aren't any such things. I think I even closed loading properties this 
time, although that would be unrelated I think.

When we create cores in old-style solr.xml land, there's no need to do anything 
special to exit the tests. So I'm hoping someone has an "aha" moment. Otherwise 
I need to dig into core creation in the discovery case and find out if it 
really is different.



java.lang.AssertionError: ERROR: SolrIndexSearcher opens=3 closes=1
        at __randomizedtesting.SeedInfo.seed([445018872D608FD5]:0)
        at org.junit.Assert.fail(Assert.java:93)
        at 
org.apache.solr.SolrTestCaseJ4.endTrackingSearchers(SolrTestCaseJ4.java:275)
        at org.apache.solr.SolrTestCaseJ4.afterClass(SolrTestCaseJ4.java:122)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at 
com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1559)
        at 
com.carrotsearch.randomizedtesting.RandomizedRunner.access$600(RandomizedRunner.java:79)

                
> Creating a core while referencing system properties looks like it loses files.
> ------------------------------------------------------------------------------
>
>                 Key: SOLR-4982
>                 URL: https://issues.apache.org/jira/browse/SOLR-4982
>             Project: Solr
>          Issue Type: Bug
>          Components: multicore
>    Affects Versions: 4.3, 5.0
>            Reporter: Erick Erickson
>            Assignee: Erick Erickson
>         Attachments: SOLR-4982.patch, SOLR-4982.patch
>
>
> If you use the core admin handler to create core and reference system 
> properties and index files without restarting Solr, your files are indexed to 
> the wrong place.
> Say for instance I define a sys prop EOE=/Users/Erick/tmp and create a core 
> with this request
> localhost:8983/solr/admin/cores?action=CREATE&name=coreZ&instanceDir=coreZ&dataDir=%24%7BEOE%7D
> where %24%7BEOE%7D is really ${EOE} after URL escaping. What gets preserved 
> in solr.xml is correct, dataDir is set to ${EOE}. And if I restart Solr, then 
> index documents, they wind up in /Users/Erick/tmp. This is as it should be.
> HOWEVER, if rather than immediately restart Solr I index some documents to 
> CoreZ, they go in <solr_home>/CoreZ/${EOE}. The literal path is ${EOE}, 
> dollar sign, curly braces and all.
> How important is this to fix for 4.4?

--
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