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

Colvin Cowie commented on SOLR-13396:
-------------------------------------

I've created a draft PR to add a flag to just disable this behavior, 
[https://github.com/apache/solr/pull/1321]. It still needs a test and some 
other things, but hopefully it's a starting point for discussion and getting 
this fixed in Solr itself.

 
{quote}[~caomanhdat] added a comment - 04/Oct/19 13:39
Yeah I mean rather than coming up with something complicated. Should we just 
improve the logic here so most of the cases will be solved. I.E: check 
existence of clusterstate before delete core.
{quote}
I think that even with improvements to the logic, I would still prefer to have 
an override that disables automatic deletion of cores. In fact I would prefer 
to have to explicitly enable automatic deletion if I want to opt-in to it.

Personally, I think the only time I want a core to be deleted automatically is 
if the creation of a new collection/core fails. Otherwise it just makes me very 
nervous. I can always clean things up manually, but I can't undelete without a 
fresh backup (though obviously regular backups are needed as well but that's 
not the point for me).

> SolrCloud will delete the core data for any core that is not referenced in 
> the clusterstate
> -------------------------------------------------------------------------------------------
>
>                 Key: SOLR-13396
>                 URL: https://issues.apache.org/jira/browse/SOLR-13396
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>    Affects Versions: 7.3.1, 8.0
>            Reporter: Shawn Heisey
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> SOLR-12066 is an improvement designed to delete core data for replicas that 
> were deleted while the node was down -- better cleanup.
> In practice, that change causes SolrCloud to delete all core data for cores 
> that are not referenced in the ZK clusterstate.  If all the ZK data gets 
> deleted or the Solr instance is pointed at a ZK ensemble with no data, it 
> will proceed to delete all of the cores in the solr home, with no possibility 
> of recovery.
> I do not think that Solr should ever delete core data unless an explicit 
> DELETE action has been made and the node is operational at the time of the 
> request.  If a core exists during startup that cannot be found in the ZK 
> clusterstate, it should be ignored (not started) and a helpful message should 
> be logged.  I think that message should probably be at WARN so that it shows 
> up in the admin UI logging tab with default settings.



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