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

Eric Pugh commented on SOLR-17171:
----------------------------------

SOLR-18008 introduces solr.cloud.delete.unknown.cores.enabled that deals with 
this when you create a replacement core.   Would that let us mark this closed 
as a workaround?

> DeleteCollectionCmd should specify DELETE_INDEX=true
> ----------------------------------------------------
>
>                 Key: SOLR-17171
>                 URL: https://issues.apache.org/jira/browse/SOLR-17171
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 10.0
>            Reporter: Michael Gibney
>            Priority: Trivial
>
> Since its inception, {{DeleteCollectionCmd}} has [not explicitly 
> requested|https://github.com/apache/solr/blob/e7051f9058ff011049cd727deaaadb4d97a2e3f7/solr/core/src/java/org/apache/solr/cloud/api/collections/DeleteCollectionCmd.java#L119-L120]
>  deletion of the index directory, but has instead relied upon the fact that 
> in most (all?) cases, the index directory is implicitly deleted as a 
> subdirectory of the core instance and/or data directories.
> All other similar commands that I can find (e.g. 
> [DeleteReplicaCmd|https://github.com/apache/solr/blob/e7051f9058ff011049cd727deaaadb4d97a2e3f7/solr/core/src/java/org/apache/solr/cloud/api/collections/DeleteReplicaCmd.java#L304-L309])
>  do explicitly delete the indexDir.
> In the common case, this does not present a practical problem for 
> {{DeleteCollectionCmd}}, because the index dir is implicitly deleted, and the 
> vestigial reference to the indexDir in {{CachingDirectoryFactory}} is GC'd 
> when the core and DirectoryFactory are closed. But for {{Directory}} impls 
> that need to clean up associated state, this can be a problem.
> An analogous change was made in SOLR-4741 -- [explicitly deleting the core 
> dataDir|https://github.com/apache/solr/commit/8aa09aeca0c37cbfa2bcf3c3548f0341a416245b]
>  --  and adding explicit indexDir deletion here would simply bring 
> {{DeleteCollectionCmd}} in line with all other similar invocations of 
> {{SolrCore.unloadOnClose(...)}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to