[jira] Created: (SOLR-1577) undesirable dataDir default in example config

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (SOLR-1577) undesirable dataDir default in example config

Tim Allison (Jira)
undesirable dataDir default in example config
---------------------------------------------

                 Key: SOLR-1577
                 URL: https://issues.apache.org/jira/browse/SOLR-1577
             Project: Solr
          Issue Type: Bug
            Reporter: Yonik Seeley
            Priority: Minor
             Fix For: 1.5


dataDir in the example solrconfig.xml defaults to ./solr/data (as opposed to the solr home)
http://search.lucidimagination.com/search/document/7759f05f576d6727
http://search.lucidimagination.com/search/document/c5ae6fa490d0f59a



--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SOLR-1577) undesirable dataDir default in example config

Tim Allison (Jira)

    [ https://issues.apache.org/jira/browse/SOLR-1577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779996#action_12779996 ]

Yonik Seeley commented on SOLR-1577:
------------------------------------

Does anyone remember a reason why we haven't changed this?
Seems like the right fix is to simply comment out dataDir to get the correct default?

To reproduce the undesirable behavior:
{code}
cd example
mv solr s2
java -Dsolr.solr.home=s2 -jar start.jar
#observe that solr/data is created and used as the data dir
{code}


> undesirable dataDir default in example config
> ---------------------------------------------
>
>                 Key: SOLR-1577
>                 URL: https://issues.apache.org/jira/browse/SOLR-1577
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Yonik Seeley
>            Priority: Minor
>             Fix For: 1.5
>
>
> dataDir in the example solrconfig.xml defaults to ./solr/data (as opposed to the solr home)
> http://search.lucidimagination.com/search/document/7759f05f576d6727
> http://search.lucidimagination.com/search/document/c5ae6fa490d0f59a

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SOLR-1577) undesirable dataDir default in example config

Tim Allison (Jira)
In reply to this post by Tim Allison (Jira)

    [ https://issues.apache.org/jira/browse/SOLR-1577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12780183#action_12780183 ]

Hoss Man commented on SOLR-1577:
--------------------------------

I don't have the code/configs in front of me, but if i remember correctly it was a collision/comprimise between...

1. the default if there is no <dataDir> is to use "data' in the instance dir
2. that the legacy behavior of <dataDir> was to be resolve the path relative the working directory (not the instance dir)
3. that people wanted to be able to use a solr.data.dir property with the example configs to pick an arbitrary data dir at run time for demoing stuff.

...if we comment out <dataDir> then #3 stops working.  and because of #2 it's impossible to have a default for the solr.data.dir property in the example configs which matches the same behavior as having no dataDir at all.

we might just want to bite the bullet and say that in the next version of solr, dataDir will be relative the instance dir, and if you don't like it add some new 'rel="cwd"' attribute to the <dataDir> tag.  (or add a new default system param for absolute path of the current working directory and tell people they have to use that if they want the rest of hte value to be relative that directory)



> undesirable dataDir default in example config
> ---------------------------------------------
>
>                 Key: SOLR-1577
>                 URL: https://issues.apache.org/jira/browse/SOLR-1577
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Yonik Seeley
>            Priority: Minor
>             Fix For: 1.5
>
>
> dataDir in the example solrconfig.xml defaults to ./solr/data (as opposed to the solr home)
> http://search.lucidimagination.com/search/document/7759f05f576d6727
> http://search.lucidimagination.com/search/document/c5ae6fa490d0f59a

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SOLR-1577) undesirable dataDir default in example config

Tim Allison (Jira)
In reply to this post by Tim Allison (Jira)

    [ https://issues.apache.org/jira/browse/SOLR-1577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12780195#action_12780195 ]

Yonik Seeley commented on SOLR-1577:
------------------------------------

bq. 2. that the legacy behavior of <dataDir> was to be resolve the path relative the working directory (not the instance dir)

I always really expected that if you switch the instance dir, you switch the data dir by default... that's what happens by default if there is no dataDir specified in solrconfig.xml

bq. 3. that people wanted to be able to use a solr.data.dir property with the example configs to pick an arbitrary data dir at run time for demoing stuff.

Unfortunately, there's no way of specifying a path relativer to the instance dir.
What if we at least made it such that an empty dataDir meant ./solr/data relative to the instance dir?

Then we could change
<dataDir>${solr.data.dir:./solr/data}</dataDir>
To
<dataDir>${solr.data.dir}</dataDir>



> undesirable dataDir default in example config
> ---------------------------------------------
>
>                 Key: SOLR-1577
>                 URL: https://issues.apache.org/jira/browse/SOLR-1577
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Yonik Seeley
>            Priority: Minor
>             Fix For: 1.5
>
>
> dataDir in the example solrconfig.xml defaults to ./solr/data (as opposed to the solr home)
> http://search.lucidimagination.com/search/document/7759f05f576d6727
> http://search.lucidimagination.com/search/document/c5ae6fa490d0f59a

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (SOLR-1577) undesirable dataDir default in example config

Tim Allison (Jira)
In reply to this post by Tim Allison (Jira)

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

Yonik Seeley updated SOLR-1577:
-------------------------------

    Attachment: SOLR-1577.patch

Here's a patch that still allows solr.data.dir to be used in <dataDir> but interprets a zero length dataDir as null - resulting in the default.


> undesirable dataDir default in example config
> ---------------------------------------------
>
>                 Key: SOLR-1577
>                 URL: https://issues.apache.org/jira/browse/SOLR-1577
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Yonik Seeley
>            Priority: Minor
>             Fix For: 1.5
>
>         Attachments: SOLR-1577.patch
>
>
> dataDir in the example solrconfig.xml defaults to ./solr/data (as opposed to the solr home)
> http://search.lucidimagination.com/search/document/7759f05f576d6727
> http://search.lucidimagination.com/search/document/c5ae6fa490d0f59a

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (SOLR-1577) undesirable dataDir default in example config

Tim Allison (Jira)
In reply to this post by Tim Allison (Jira)

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

Yonik Seeley resolved SOLR-1577.
--------------------------------

    Resolution: Fixed

committed.

> undesirable dataDir default in example config
> ---------------------------------------------
>
>                 Key: SOLR-1577
>                 URL: https://issues.apache.org/jira/browse/SOLR-1577
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Yonik Seeley
>            Priority: Minor
>             Fix For: 1.5
>
>         Attachments: SOLR-1577.patch
>
>
> dataDir in the example solrconfig.xml defaults to ./solr/data (as opposed to the solr home)
> http://search.lucidimagination.com/search/document/7759f05f576d6727
> http://search.lucidimagination.com/search/document/c5ae6fa490d0f59a

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SOLR-1577) undesirable dataDir default in example config

Tim Allison (Jira)
In reply to this post by Tim Allison (Jira)

    [ https://issues.apache.org/jira/browse/SOLR-1577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12781544#action_12781544 ]

Hoss Man commented on SOLR-1577:
--------------------------------

Doesn't this break things for (hypothetical) people who have been using <dataDir></dataDir> to signify that the current working directory should be used as the data dir?

> undesirable dataDir default in example config
> ---------------------------------------------
>
>                 Key: SOLR-1577
>                 URL: https://issues.apache.org/jira/browse/SOLR-1577
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Yonik Seeley
>            Priority: Minor
>             Fix For: 1.5
>
>         Attachments: SOLR-1577.patch
>
>
> dataDir in the example solrconfig.xml defaults to ./solr/data (as opposed to the solr home)
> http://search.lucidimagination.com/search/document/7759f05f576d6727
> http://search.lucidimagination.com/search/document/c5ae6fa490d0f59a

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SOLR-1577) undesirable dataDir default in example config

Tim Allison (Jira)
In reply to this post by Tim Allison (Jira)

    [ https://issues.apache.org/jira/browse/SOLR-1577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12781550#action_12781550 ]

Yonik Seeley commented on SOLR-1577:
------------------------------------

Yep.  It does really seem hypothetical though - using a zero length string instead of "." to reference the current directory isn't natural.  The fix seemed like the best compromise between fixing the buggy old behavior.  If people are against it, we could revert and simply comment out <dataDir> in the example config - but we definitely shouldn't leave a default that doesn't follow the solr instance dir.

> undesirable dataDir default in example config
> ---------------------------------------------
>
>                 Key: SOLR-1577
>                 URL: https://issues.apache.org/jira/browse/SOLR-1577
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Yonik Seeley
>            Priority: Minor
>             Fix For: 1.5
>
>         Attachments: SOLR-1577.patch
>
>
> dataDir in the example solrconfig.xml defaults to ./solr/data (as opposed to the solr home)
> http://search.lucidimagination.com/search/document/7759f05f576d6727
> http://search.lucidimagination.com/search/document/c5ae6fa490d0f59a

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SOLR-1577) undesirable dataDir default in example config

Tim Allison (Jira)
In reply to this post by Tim Allison (Jira)

    [ https://issues.apache.org/jira/browse/SOLR-1577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12781568#action_12781568 ]

Hoss Man commented on SOLR-1577:
--------------------------------

I'm okay with it ... i'd like us to ultimately move to all patchs (not just data dir) being resolved relative the instanceDir .. but this seems like a smaller first step then anything else i had in mind.

telling people they have to use "." if there really have some reason to use the CWD as a data dir seems fine to me.


> undesirable dataDir default in example config
> ---------------------------------------------
>
>                 Key: SOLR-1577
>                 URL: https://issues.apache.org/jira/browse/SOLR-1577
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Yonik Seeley
>            Priority: Minor
>             Fix For: 1.5
>
>         Attachments: SOLR-1577.patch
>
>
> dataDir in the example solrconfig.xml defaults to ./solr/data (as opposed to the solr home)
> http://search.lucidimagination.com/search/document/7759f05f576d6727
> http://search.lucidimagination.com/search/document/c5ae6fa490d0f59a

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.