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