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

Shawn Heisey commented on SOLR-8757:
------------------------------------

You don't need an extension to do this.  The CoreAdmin can already do it 
without custom code.

Just ask CoreAdmin to swap the two cores, then unload the "old" one.

I personally just keep two cores for every index -- a build core and a live 
core.  I swap them as needed with the HTTP API, and never unload either one.  
The directory names for these cores do not include "live" or "build" ... for 
the cores named s0build and s0live, the directories are s0_0 and s0_1.


> Swap + unload does not work
> ---------------------------
>
>                 Key: SOLR-8757
>                 URL: https://issues.apache.org/jira/browse/SOLR-8757
>             Project: Solr
>          Issue Type: Bug
>          Components: multicore
>    Affects Versions: 5.5
>            Reporter: Fabrizio Fortino
>
> I have created a Solr CoreAdminHandler extension with the goal to swap two 
> cores and remove the old one.
> My code looks like this:
> SolrCore core = coreContainer.create("newcore", coreProps)
> coreContainer.swap("newcore", "livecore")
> // the old livecore is now newcore, so unload it and remove all the related 
> dirs
> coreContainer.unload("newcore", true, true, true)
> After the last statement get executed the Solr log starts printing the 
> following messages forever
> 61424 INFO (pool-1-thread-1) [ x:newcore] o.a.s.c.SolrCore Core newcore is 
> not yet closed, waiting 100 ms before checking again.
> I tried to call the close() method on the SolrCore instance before and after 
> the unload but the result is the same.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to