I gathered a solr log from 7.6.0 at TRACE level. Then I replicated the experiment with 6.6.5 and with that version, the directories were not deleted. Log also included.
The audit log is from solr7. The deletes start at 01:51:48, which translates to 23:51:48 UTC, which you'll be able to find in the solr7 log. The directories were deleted, you can see the calls in the audit logs, but I can't identify in the solr7 log if a delete is being called somewhere. Could be that it's not logged at all. I zipped it all and put it on dropbox: https://www.dropbox.com/s/fei2td3zdh92i67/research.zip?dl=0 The order of the setup is: - zookeeper - solr - after setup(contains audit log output of a previous attempt) Anyone trying to replicate, beware to not blindly copy the commands. This was done on a fresh Ubuntu 18.04 VM, which I suggest for anyone wanting to test this. Regards, Koen On Thu, Apr 11, 2019 at 11:21 PM Shawn Heisey <apa...@elyograg.org> wrote: > On 4/11/2019 2:40 PM, Koen De Groote wrote: > > That being explained, am I right in understanding that currently there is > > no way of configuring Solr so that it won't delete the folders, in this > > event? > > In my opinion, Solr should never delete cores unless it has been > explicitly *ASKED* to do so with some kind of delete request. > > I found this issue, which might explain it: > > https://issues.apache.org/jira/browse/SOLR-12066 > > I think I understand what the goal was with that issue, but if I > understand it correctly, it basically will cause SolrCloud to delete any > core from disk on startup which is not referenced in ZooKeeper. > > Can you share a solr.log file from a Solr instance that is deleting > data? You'll need to use a file sharing site -- attachments are almost > always stripped by the mailing list software. It will be helpful to > know what directories and core names were deleted, so that info can be > checked in the log. > > I do not know whether Solr logs anything when it deletes a core. If > not, it should. > > Here what I think should happen instead: If a core that SolrCloud finds > during startup is not in the ZooKeeper database, it should simply not > start, with a helpful message at WARN in the log. The data should never > be deleted automatically on startup. > > Thanks, > Shawn >