You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Ryan McKinley (JIRA)" <ji...@apache.org> on 2008/04/22 02:37:26 UTC

[jira] Created: (SOLR-545) remove MultiCore "default" core / cleanup DispatchHandlera

remove MultiCore "default" core / cleanup DispatchHandlera 
-----------------------------------------------------------

                 Key: SOLR-545
                 URL: https://issues.apache.org/jira/browse/SOLR-545
             Project: Solr
          Issue Type: Bug
    Affects Versions: 1.3
            Reporter: Ryan McKinley
             Fix For: 1.3


MultiCore should require a core name in the URL.  If the core name is missing, there should be a 404, not a valid core.  That is:
http://localhost:8983/solr/select?q=*:*  should return 404.

While we are at it, we should cleanup the DispatchHandler.  Perhaps the best approach is to treat single core as multicore with only one core?  As is the tangle of potential paths is ugly.

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


[jira] Updated: (SOLR-545) remove MultiCore "default" core / cleanup DispatchHandler

Posted by "Henri Biestro (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-545?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henri Biestro updated SOLR-545:
-------------------------------

    Attachment: solr-545.patch

New version of the patch integrates solr-647 (ref counting for SolrCore) & modifies SolrDispatchFilter/EmbeddedSolrServer to protect running queries.
Also fixes the 'strict' filter parameter that was not properly consumed if set though the web.xml.

> remove MultiCore "default" core / cleanup DispatchHandler
> ---------------------------------------------------------
>
>                 Key: SOLR-545
>                 URL: https://issues.apache.org/jira/browse/SOLR-545
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>             Fix For: 1.3
>
>         Attachments: solr-545.patch, solr-545.patch
>
>
> MultiCore should require a core name in the URL.  If the core name is missing, there should be a 404, not a valid core.  That is:
> http://localhost:8983/solr/select?q=*:*  should return 404.
> While we are at it, we should cleanup the DispatchHandler.  Perhaps the best approach is to treat single core as multicore with only one core?  As is the tangle of potential paths is ugly.

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


[jira] Updated: (SOLR-545) remove MultiCore "default" core / cleanup DispatchHandler

Posted by "Henri Biestro (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-545?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henri Biestro updated SOLR-545:
-------------------------------

    Attachment: solr-545.patch

About the fall-through behavior of the filter, the default/example Jetty configuration still declares the (deprecated) servlet.
The net effect is that hitting 'http://.../select' (instead of http://.../corename/select') still works since the servlet will use the SolrCore.getCore() to find a core.

As a tentative workaround, this small patch introduces the SolrDispatchFilter 'strict' parameter.
If 'strict' is set to true, the filter will not fall through the chain and thus disallow any other filter/servlet to handle the request.
By default, if unspecified, the filter is 'strict' in multicore and lenient (not strict) in 'single core'.

> remove MultiCore "default" core / cleanup DispatchHandler
> ---------------------------------------------------------
>
>                 Key: SOLR-545
>                 URL: https://issues.apache.org/jira/browse/SOLR-545
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>             Fix For: 1.3
>
>         Attachments: solr-545.patch
>
>
> MultiCore should require a core name in the URL.  If the core name is missing, there should be a 404, not a valid core.  That is:
> http://localhost:8983/solr/select?q=*:*  should return 404.
> While we are at it, we should cleanup the DispatchHandler.  Perhaps the best approach is to treat single core as multicore with only one core?  As is the tangle of potential paths is ugly.

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


[jira] Commented: (SOLR-545) remove MultiCore "default" core / cleanup DispatchHandler

Posted by "Lars Kotthoff (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621337#action_12621337 ] 

Lars Kotthoff commented on SOLR-545:
------------------------------------

Throwing an exception in the JSP causes the error page to look like an error page that's generated when the JSP can't be compiled. This might be confusing and should probably be replaced with a "nicer" error page.

> remove MultiCore "default" core / cleanup DispatchHandler
> ---------------------------------------------------------
>
>                 Key: SOLR-545
>                 URL: https://issues.apache.org/jira/browse/SOLR-545
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>             Fix For: 1.3
>
>         Attachments: SOLR-545-path-access.patch, solr-545.patch, solr-545.patch, solr-545.patch, solr-545.patch
>
>
> MultiCore should require a core name in the URL.  If the core name is missing, there should be a 404, not a valid core.  That is:
> http://localhost:8983/solr/select?q=*:*  should return 404.
> While we are at it, we should cleanup the DispatchHandler.  Perhaps the best approach is to treat single core as multicore with only one core?  As is the tangle of potential paths is ugly.

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


[jira] Commented: (SOLR-545) remove MultiCore "default" core / cleanup DispatchHandler

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621339#action_12621339 ] 

Ryan McKinley commented on SOLR-545:
------------------------------------

how about:

{code}
--- src/webapp/web/admin/_info.jsp	(revision 684615)
+++ src/webapp/web/admin/_info.jsp	(working copy)
@@ -29,7 +29,8 @@
   // 
   SolrCore  core = (SolrCore) request.getAttribute("org.apache.solr.SolrCore");
   if (core == null) {
-    throw new SolrException( SolrException.ErrorCode.BAD_REQUEST, "missing core name" );
+    response.sendError( 400, "missing core name in path" );
+    return;
   }
{code}


> remove MultiCore "default" core / cleanup DispatchHandler
> ---------------------------------------------------------
>
>                 Key: SOLR-545
>                 URL: https://issues.apache.org/jira/browse/SOLR-545
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>             Fix For: 1.3
>
>         Attachments: SOLR-545-path-access.patch, solr-545.patch, solr-545.patch, solr-545.patch, solr-545.patch
>
>
> MultiCore should require a core name in the URL.  If the core name is missing, there should be a 404, not a valid core.  That is:
> http://localhost:8983/solr/select?q=*:*  should return 404.
> While we are at it, we should cleanup the DispatchHandler.  Perhaps the best approach is to treat single core as multicore with only one core?  As is the tangle of potential paths is ugly.

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


[jira] Updated: (SOLR-545) remove MultiCore "default" core / cleanup DispatchHandler

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-545?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ryan McKinley updated SOLR-545:
-------------------------------

    Summary: remove MultiCore "default" core / cleanup DispatchHandler  (was: remove MultiCore "default" core / cleanup DispatchHandlera )

> remove MultiCore "default" core / cleanup DispatchHandler
> ---------------------------------------------------------
>
>                 Key: SOLR-545
>                 URL: https://issues.apache.org/jira/browse/SOLR-545
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>             Fix For: 1.3
>
>
> MultiCore should require a core name in the URL.  If the core name is missing, there should be a 404, not a valid core.  That is:
> http://localhost:8983/solr/select?q=*:*  should return 404.
> While we are at it, we should cleanup the DispatchHandler.  Perhaps the best approach is to treat single core as multicore with only one core?  As is the tangle of potential paths is ugly.

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


[jira] Commented: (SOLR-545) remove MultiCore "default" core / cleanup DispatchHandler

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621187#action_12621187 ] 

Yonik Seeley commented on SOLR-545:
-----------------------------------

I've not fully diciphered the dispatch filter, but my first thought was that multi-core could always be there (no enabled/disabled).
The only difference could be in the DispatchFilter which if a core of name "" exists, it uses paths w/o a core name and the other cores would be unreachable. That would enable core reloading, etc, for the single-core scenario.


> remove MultiCore "default" core / cleanup DispatchHandler
> ---------------------------------------------------------
>
>                 Key: SOLR-545
>                 URL: https://issues.apache.org/jira/browse/SOLR-545
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>             Fix For: 1.3
>
>         Attachments: SOLR-545-path-access.patch, solr-545.patch, solr-545.patch, solr-545.patch, solr-545.patch
>
>
> MultiCore should require a core name in the URL.  If the core name is missing, there should be a 404, not a valid core.  That is:
> http://localhost:8983/solr/select?q=*:*  should return 404.
> While we are at it, we should cleanup the DispatchHandler.  Perhaps the best approach is to treat single core as multicore with only one core?  As is the tangle of potential paths is ugly.

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


[jira] Commented: (SOLR-545) remove MultiCore "default" core / cleanup DispatchHandler

Posted by "Henri Biestro (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621195#action_12621195 ] 

Henri Biestro commented on SOLR-545:
------------------------------------

Yonik,
Good catch!
I'm gonna give it a try.

> remove MultiCore "default" core / cleanup DispatchHandler
> ---------------------------------------------------------
>
>                 Key: SOLR-545
>                 URL: https://issues.apache.org/jira/browse/SOLR-545
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>             Fix For: 1.3
>
>         Attachments: SOLR-545-path-access.patch, solr-545.patch, solr-545.patch, solr-545.patch, solr-545.patch
>
>
> MultiCore should require a core name in the URL.  If the core name is missing, there should be a 404, not a valid core.  That is:
> http://localhost:8983/solr/select?q=*:*  should return 404.
> While we are at it, we should cleanup the DispatchHandler.  Perhaps the best approach is to treat single core as multicore with only one core?  As is the tangle of potential paths is ugly.

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


[jira] Commented: (SOLR-545) remove MultiCore "default" core / cleanup DispatchHandler

Posted by "Henri Biestro (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12620078#action_12620078 ] 

Henri Biestro commented on SOLR-545:
------------------------------------

Not knowing how advanced Ryan is on solving the whole issue, I might be completely off-base...

As far as I remember, we had a "default" attribute that could be applied to one core (in the multicore case); this part is gone.
The current SolrDispatchFilter behavior is to let the filter chain handle any URL that is not a request that solr can recognize as valid. We may add as a default that the chain ends in 404 in the 'unhandlable' case but that default fall through behavior should remain opened/overridable (multiple core spanning/joining requests could be handled in another filter for instance). 

If we treat single core as multicore with only one core AND there is no default core:
The current test for what would be that "single-core" multicore situation looks like (multicore == null || multicore.isEnabled() == false); the ability to let users derive MultiCore (for serialization purpose at least) and  let them allocate it (through SolrDispatchFilter.initMultiCore()) should be kept (we are trying to avoid reintroducing a singleton here).
 If so & as is, this "single-core" multicore can not (should not be able to?) create new cores (nor can it swap cores since it can't create a new one) and probably should not attempt to read the multicore.properties (by-product of solr-646); this implies some new checks must be performed at the multicore level & dealing with a 'null' core name will still have to be considered & tested.
The risk - with my current understanding/knowledge - does not seem worth the (shallow) gain.

Back to the issue description:
"MultiCore should require a core name in the URL; If the core name is missing, there should be a 404": +1 as long as this can be changed ("not a valid core" is already out of the equation)
"...treat single core as multicore with only one core? As is the tangle of potential paths is ugly..": although the code is more complex than we'd like (at least the SolrDispatchFilter code), it is fairly well documented and I'm not completely sure there is a lot to gain (considering the null core name & 1.3 delays and that the simplest action could be to deprecate "single core" altogether). So, -1


> remove MultiCore "default" core / cleanup DispatchHandler
> ---------------------------------------------------------
>
>                 Key: SOLR-545
>                 URL: https://issues.apache.org/jira/browse/SOLR-545
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>             Fix For: 1.3
>
>
> MultiCore should require a core name in the URL.  If the core name is missing, there should be a 404, not a valid core.  That is:
> http://localhost:8983/solr/select?q=*:*  should return 404.
> While we are at it, we should cleanup the DispatchHandler.  Perhaps the best approach is to treat single core as multicore with only one core?  As is the tangle of potential paths is ugly.

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


[jira] Commented: (SOLR-545) remove MultiCore "default" core / cleanup DispatchHandler

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621343#action_12621343 ] 

Ryan McKinley commented on SOLR-545:
------------------------------------

done. thanks Lars

> remove MultiCore "default" core / cleanup DispatchHandler
> ---------------------------------------------------------
>
>                 Key: SOLR-545
>                 URL: https://issues.apache.org/jira/browse/SOLR-545
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>             Fix For: 1.3
>
>         Attachments: SOLR-545-path-access.patch, solr-545.patch, solr-545.patch, solr-545.patch, solr-545.patch
>
>
> MultiCore should require a core name in the URL.  If the core name is missing, there should be a 404, not a valid core.  That is:
> http://localhost:8983/solr/select?q=*:*  should return 404.
> While we are at it, we should cleanup the DispatchHandler.  Perhaps the best approach is to treat single core as multicore with only one core?  As is the tangle of potential paths is ugly.

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


[jira] Commented: (SOLR-545) remove MultiCore "default" core / cleanup DispatchHandler

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12620041#action_12620041 ] 

Yonik Seeley commented on SOLR-545:
-----------------------------------

bq. Perhaps the best approach is to treat single core as multicore with only one core?

+1

> remove MultiCore "default" core / cleanup DispatchHandler
> ---------------------------------------------------------
>
>                 Key: SOLR-545
>                 URL: https://issues.apache.org/jira/browse/SOLR-545
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>             Fix For: 1.3
>
>
> MultiCore should require a core name in the URL.  If the core name is missing, there should be a 404, not a valid core.  That is:
> http://localhost:8983/solr/select?q=*:*  should return 404.
> While we are at it, we should cleanup the DispatchHandler.  Perhaps the best approach is to treat single core as multicore with only one core?  As is the tangle of potential paths is ugly.

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


[jira] Commented: (SOLR-545) remove MultiCore "default" core / cleanup DispatchHandler

Posted by "Henri Biestro (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621190#action_12621190 ] 

Henri Biestro commented on SOLR-545:
------------------------------------

Ryan, glad  I could. :-)

On solr-647, or more precisely "The SolrDispatchFilter (& EmbeddedSolrServer) need to protect against core closing while queries are executing", should we then create another specific issue (solved in the 1.3 timeframe) ?

On solr-545 itself, I agree your solution is better & simpler than introducing the 'strict' parameter.
One comment, shouldn't the deprecated servlet check for the existence of the 'org.apache.solr.MultiCore' request attribute though?
You can instantiate multicore in other/derived ways through the servlet filter & could still inadvertently go through the servlet.

On the "crazy path checking", I'm currently trying to refactor/merge SolrDipatchFilter & EmbeddedSolrServer to both derive from one "SolrFilter" .
Tell me if  this is a bad idea or if this should be also another issue (that could be fixed later than 1.3).

Thanks




> remove MultiCore "default" core / cleanup DispatchHandler
> ---------------------------------------------------------
>
>                 Key: SOLR-545
>                 URL: https://issues.apache.org/jira/browse/SOLR-545
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>             Fix For: 1.3
>
>         Attachments: SOLR-545-path-access.patch, solr-545.patch, solr-545.patch, solr-545.patch, solr-545.patch
>
>
> MultiCore should require a core name in the URL.  If the core name is missing, there should be a 404, not a valid core.  That is:
> http://localhost:8983/solr/select?q=*:*  should return 404.
> While we are at it, we should cleanup the DispatchHandler.  Perhaps the best approach is to treat single core as multicore with only one core?  As is the tangle of potential paths is ugly.

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


[jira] Updated: (SOLR-545) remove MultiCore "default" core / cleanup DispatchHandler

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-545?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ryan McKinley updated SOLR-545:
-------------------------------

    Attachment: SOLR-545-path-access.patch

Henri - thanks for your help on this.... a couple comments.

It would be nice to keep solr-647 as in independent issue.  I would rather have Yonik verify all the ref counted stuff.

I'm not a big fan of adding the 'strict' parameter to web.xml -- the behavior should be well defined simply from the external configs (multicore(solr).xml / solrconfig.xml) 

Currently, I see two problems with the RequestDispatcher:

1. it has a lot of crazy path checking
2. It has incorrect behavior for /select and /admin/ in a "multicore" environment

The attached patch only helps with #2 and does not make #1 worse --  In the deprecated SolrServlet, it checks the existance of multicore.xml (soon to be solr.xml) and throws an error if it exists.  For the /admin side, we throw an error if the DispatchFilter does not set the core


> remove MultiCore "default" core / cleanup DispatchHandler
> ---------------------------------------------------------
>
>                 Key: SOLR-545
>                 URL: https://issues.apache.org/jira/browse/SOLR-545
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>             Fix For: 1.3
>
>         Attachments: SOLR-545-path-access.patch, solr-545.patch, solr-545.patch, solr-545.patch, solr-545.patch
>
>
> MultiCore should require a core name in the URL.  If the core name is missing, there should be a 404, not a valid core.  That is:
> http://localhost:8983/solr/select?q=*:*  should return 404.
> While we are at it, we should cleanup the DispatchHandler.  Perhaps the best approach is to treat single core as multicore with only one core?  As is the tangle of potential paths is ugly.

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


[jira] Commented: (SOLR-545) remove MultiCore "default" core / cleanup DispatchHandler

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621316#action_12621316 ] 

Ryan McKinley commented on SOLR-545:
------------------------------------

I just committed SOLR-545-path-access.patch -- that should fix the behavior when things fall through to /admin/ or /select (via the SolrServlet)

We still need to clean up the DispatchFilter path -- henri, i like the idea of a single code path for SolrDipatchFilter & EmbeddedSolrServer

> remove MultiCore "default" core / cleanup DispatchHandler
> ---------------------------------------------------------
>
>                 Key: SOLR-545
>                 URL: https://issues.apache.org/jira/browse/SOLR-545
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>             Fix For: 1.3
>
>         Attachments: SOLR-545-path-access.patch, solr-545.patch, solr-545.patch, solr-545.patch, solr-545.patch
>
>
> MultiCore should require a core name in the URL.  If the core name is missing, there should be a 404, not a valid core.  That is:
> http://localhost:8983/solr/select?q=*:*  should return 404.
> While we are at it, we should cleanup the DispatchHandler.  Perhaps the best approach is to treat single core as multicore with only one core?  As is the tangle of potential paths is ugly.

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


[jira] Resolved: (SOLR-545) remove MultiCore "default" core / cleanup DispatchHandler

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-545?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ryan McKinley resolved SOLR-545.
--------------------------------

    Resolution: Fixed

> remove MultiCore "default" core / cleanup DispatchHandler
> ---------------------------------------------------------
>
>                 Key: SOLR-545
>                 URL: https://issues.apache.org/jira/browse/SOLR-545
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>             Fix For: 1.3
>
>         Attachments: SOLR-545-path-access.patch, solr-545.patch, solr-545.patch, solr-545.patch, solr-545.patch
>
>
> MultiCore should require a core name in the URL.  If the core name is missing, there should be a 404, not a valid core.  That is:
> http://localhost:8983/solr/select?q=*:*  should return 404.
> While we are at it, we should cleanup the DispatchHandler.  Perhaps the best approach is to treat single core as multicore with only one core?  As is the tangle of potential paths is ugly.

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


[jira] Commented: (SOLR-545) remove MultiCore "default" core / cleanup DispatchHandler

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12620616#action_12620616 ] 

Yonik Seeley commented on SOLR-545:
-----------------------------------

It seems like this type of reference counting still has a race (either that, or it's a form of  optimistic locking that must be re-tried in a loop which is currently missing from the code).

Could this be simplified?
SolrCore has a refCount... simply increment it in MultiCore (while in the sync block anyway) and decrement it on a SolrCore.release().... the SolrCore.Reference class wouldn't be needed.

> remove MultiCore "default" core / cleanup DispatchHandler
> ---------------------------------------------------------
>
>                 Key: SOLR-545
>                 URL: https://issues.apache.org/jira/browse/SOLR-545
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>             Fix For: 1.3
>
>         Attachments: solr-545.patch, solr-545.patch
>
>
> MultiCore should require a core name in the URL.  If the core name is missing, there should be a 404, not a valid core.  That is:
> http://localhost:8983/solr/select?q=*:*  should return 404.
> While we are at it, we should cleanup the DispatchHandler.  Perhaps the best approach is to treat single core as multicore with only one core?  As is the tangle of potential paths is ugly.

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


[jira] Assigned: (SOLR-545) remove MultiCore "default" core / cleanup DispatchHandlera

Posted by "Mike Klaas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-545?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mike Klaas reassigned SOLR-545:
-------------------------------

    Assignee: Ryan McKinley

assigning 1.3 multicore stuff to Ryan

> remove MultiCore "default" core / cleanup DispatchHandlera 
> -----------------------------------------------------------
>
>                 Key: SOLR-545
>                 URL: https://issues.apache.org/jira/browse/SOLR-545
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>             Fix For: 1.3
>
>
> MultiCore should require a core name in the URL.  If the core name is missing, there should be a 404, not a valid core.  That is:
> http://localhost:8983/solr/select?q=*:*  should return 404.
> While we are at it, we should cleanup the DispatchHandler.  Perhaps the best approach is to treat single core as multicore with only one core?  As is the tangle of potential paths is ugly.

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


[jira] Commented: (SOLR-545) remove MultiCore "default" core / cleanup DispatchHandler

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12620958#action_12620958 ] 

Yonik Seeley commented on SOLR-545:
-----------------------------------

bq. The locking code is the following & I believe it does not allow race conditions:

No, but as I said, it does allow the failure to aquire, and thus client code (DispatchFilter) would need to poll or something.


> remove MultiCore "default" core / cleanup DispatchHandler
> ---------------------------------------------------------
>
>                 Key: SOLR-545
>                 URL: https://issues.apache.org/jira/browse/SOLR-545
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>             Fix For: 1.3
>
>         Attachments: solr-545.patch, solr-545.patch, solr-545.patch
>
>
> MultiCore should require a core name in the URL.  If the core name is missing, there should be a 404, not a valid core.  That is:
> http://localhost:8983/solr/select?q=*:*  should return 404.
> While we are at it, we should cleanup the DispatchHandler.  Perhaps the best approach is to treat single core as multicore with only one core?  As is the tangle of potential paths is ugly.

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


[jira] Commented: (SOLR-545) remove MultiCore "default" core / cleanup DispatchHandler

Posted by "Lars Kotthoff (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621342#action_12621342 ] 

Lars Kotthoff commented on SOLR-545:
------------------------------------

I like that idea, but how about returning a 404 instead of a 400? Technically the request isn't malformed, it's just that it doesn't specify a core name and the requested page cannot be found because of that.

> remove MultiCore "default" core / cleanup DispatchHandler
> ---------------------------------------------------------
>
>                 Key: SOLR-545
>                 URL: https://issues.apache.org/jira/browse/SOLR-545
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>             Fix For: 1.3
>
>         Attachments: SOLR-545-path-access.patch, solr-545.patch, solr-545.patch, solr-545.patch, solr-545.patch
>
>
> MultiCore should require a core name in the URL.  If the core name is missing, there should be a 404, not a valid core.  That is:
> http://localhost:8983/solr/select?q=*:*  should return 404.
> While we are at it, we should cleanup the DispatchHandler.  Perhaps the best approach is to treat single core as multicore with only one core?  As is the tangle of potential paths is ugly.

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


[jira] Updated: (SOLR-545) remove MultiCore "default" core / cleanup DispatchHandler

Posted by "Henri Biestro (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-545?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henri Biestro updated SOLR-545:
-------------------------------

    Attachment: solr-545.patch

Revisited version with latest version of solr-647 included in.

Regarding ref-counting, the SolrCore.Reference now delegates most of the real work to SolrCore; it's only a convenience class that makes it easy *not* to forget to close.
The locking code is the following & I believe it does not allow race conditions:
{code}
...
  public final SolrCore open() {
    int count;
    do {
      count = refCount.get();
      // this core can not be acquired since it is clos{ed,ing}
      if (count <= 0)
        return null;
    } while (!refCount.compareAndSet(count, count + 1));
    return this;
  }

  public void close() {
    int count;
    do {
      count = refCount.get();
      if (count <= 0)
        return;
    } while (!refCount.compareAndSet(count, count - 1));
    // the count must be 1 which is the value at creation time
    // if count <= 0, we've already closed it
    // if count > 1, we must not close it
    if (count != 1) {
      //log.fine(logid+" CLOSING SolrCore postponed, refcount: " + (count - 1));
      return;
    }
    log.info(logid+" CLOSING SolrCore now!");
   // ...perform real close....
}
{code}

> remove MultiCore "default" core / cleanup DispatchHandler
> ---------------------------------------------------------
>
>                 Key: SOLR-545
>                 URL: https://issues.apache.org/jira/browse/SOLR-545
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>             Fix For: 1.3
>
>         Attachments: solr-545.patch, solr-545.patch, solr-545.patch
>
>
> MultiCore should require a core name in the URL.  If the core name is missing, there should be a 404, not a valid core.  That is:
> http://localhost:8983/solr/select?q=*:*  should return 404.
> While we are at it, we should cleanup the DispatchHandler.  Perhaps the best approach is to treat single core as multicore with only one core?  As is the tangle of potential paths is ugly.

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


[jira] Updated: (SOLR-545) remove MultiCore "default" core / cleanup DispatchHandler

Posted by "Henri Biestro (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-545?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henri Biestro updated SOLR-545:
-------------------------------

    Attachment: solr-545.patch

Took me some time to understand, sorry Yonik.
There was a "hole" between finding a core and acquiring it.
I hope I got it right this time...

> remove MultiCore "default" core / cleanup DispatchHandler
> ---------------------------------------------------------
>
>                 Key: SOLR-545
>                 URL: https://issues.apache.org/jira/browse/SOLR-545
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>             Fix For: 1.3
>
>         Attachments: solr-545.patch, solr-545.patch, solr-545.patch, solr-545.patch
>
>
> MultiCore should require a core name in the URL.  If the core name is missing, there should be a 404, not a valid core.  That is:
> http://localhost:8983/solr/select?q=*:*  should return 404.
> While we are at it, we should cleanup the DispatchHandler.  Perhaps the best approach is to treat single core as multicore with only one core?  As is the tangle of potential paths is ugly.

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