[ https://issues.apache.org/jira/browse/SOLR-17171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17819002#comment-17819002 ]
Michael Gibney commented on SOLR-17171: --------------------------------------- I've categorized this as a "Bug" since I do think this behavior is buggy, albeit latently so (not manifesting in outwardly buggy behavior for any stock {{Directory}} implementations). The fix is trivial, but it may be a few days before I can push a PR with a test. > 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: main (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: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org